-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Design] Media Services #561
Comments
I've never used Profiles or have seen them be used, but that doesn't mean it's useless... I'd made the Media import workflow easier: currently it's create folder if not already > Import > do stuff > OK. If it would be just a drop zone and upload button in the folder view that would be much simpler. This also relates to extensible Media import, what I have never used or seen being used either (but we could still keep it, just make the most used local import a more obvious one). I'm OK with the abstractions and Media items being content items. not sure what you mean by "per user media". |
The "per user media" is the special folder of Media items that are only editable by the current user. |
Drupal is very flexible, but man I was lost after half the article. Not even sure how beneficial this is compared to what we have in O1 https://www.webwash.net/manage-media-assets-drupal-8/ |
I never use profiles either, and haven't seen them used. But as @Piedone says, doesn't mean they're not useful, maybe people are just not aware, maybe they are not discoverable enough? Storage abstractions are super important. Custom import providers I think should definitely be there - for example, the Azure Media Services solution would not be possible without them.
Well, "even" better... :) The current UI is really bad. It completely breaks down when the media picker dialog happens to be invoked from within something that is already a dialog, with nested dialogs and iframes and multiple close buttons etc. To make it acceptable, we should solve this problem in a different way, and not nest dialogs in dialogs. Perhaps instead design these dialogs as "blades" and stack them horizontally like the Azure Portal does? Making media content items was a good move IMO, and personally I think we should keep it:
The biggest problem in O1 media management is that items are embedded by resolved URL into content. For OC my biggest wish would be to change this, so when you insert an image into Markdown or HTML, we use a special syntax to identify it by its content item ID, and use a filter to resolve it to the actual URL at rendering time. Inserting absolute URLs into content causes so many problems around portability of content, continuous integration, etc. @sfmskywalker might have some design notes on this somewhere - I looked for an issue where we outlined the design we came up with for this, but couldn't find it. There is an old issue however on this (OrchardCMS/Orchard#1880). |
I am suggesting to just rely on "Manage Own Media" to prevent a user from editing media items that are not his own. Users can create personal folders if they need. All media items can be selected, even with "Manage Own Media" only. As a reminder, the scenario is for a multi-blog site, each user might want to organize it's media independently. Or we might not want someone to edit existing media that are not theirs. |
To simplify the UI, I am suggesting to keep the current screens for Media management, but when we need to select media use a specific media selection that would only allow Image creation on the fly. Any other complex media operation would require to go to the media management screen instead. Then there would be a single dialog to select a media or drag and drop an image. Other screens would be full screen. |
Will there be a possibility to add files in the Media directory on the disk and have an action from the admin UI to 'import as content' the files that are in the physical folder but not yet appearing in the Media library? |
BTW, Media upload doesn't work for me anymore. I managed to upload an image when I tested the first commit of the |
It should work with the latest commit, I can create and delete folders too. Yes, I think the Media Import should be part of it. But not sure we need it for a v1, unless someone does it for free. Would be better to have it as part of the Import Media tab that we'll have after the common features are implemented. The code is already in the Update module for O1.And it only applies to the FileSystem provider. |
My two cents. |
My two cents, which seems to be resisting the general wisdom, though I'm sure I can be converted... Moving to content items
Regarding the WAMS integration, I'd be interested in hearing how much use this has received and how important it being baked into media area has been. Genuine questions. Because as you say, media content items are required to make that kind of integration. It's the only implementation of its sort I've heard of; are there any other modules extending the media module like it? My last job involved building streaming websites within Orchard and we opted not to use the media module to handle our videos (our videos were content items) because we would be writing such a customized pipeline for uploading (as did the WAMS module I imagine) that using the media module didn't really bring any benefits, only constraints. I also felt videos and images/downloads were separate, though this stemmed from the nature of the sites I guess, being specifically for video streaming. Profiles UI Providers Per user The Rest Maybe controversial but I don't think putting time in to support the upload and display of video or audio is worth it. People use external providers because they offer real functionality. People can always add support if they want it... The relevant discussions about media management in O1 might be helpful too? http://orchard.codeplex.com/discussions/359624 http://orchard.codeplex.com/discussions/402143 EDIT: clarity |
For th UI, I like the way http://jeremyfagis.github.io/dropify/ allows to replace and enhance a fileupload. I think Profiles (or transformations as you seem to call them) has to be taken from O1 but a MediaPickerField should have options like:
A FileUploadField should also be something available ootb to be used in Front-end Forms. The next two features I am expecting are:
|
@sebastienros Can please merge the Orchard.Media Module branch? I will try to make the MetaWeblogHandler to allow |
@Hazzamanic Thanks a lot for the extensive feedback. UI Can we agree that the issue is the current stacked modal dialog implementation that is super hacky? I don't think we should be able to plug different upload libraries. We need one that works with Orchard. If there are bugs with one library, we should switch to a better one. I am using jQueryUpload (https://github.com/blueimp/jQuery-File-Upload) in O2 too, and would love to know what doesn't work with it. I found dropzone that you mentioned, I am glad to use it if it's better (https://github.com/enyo/dropzone). At least make it more obvious that we can drag and drop files. Content Items I totally understand your concern. I might have an idea then. What about have a Media section just to manage files, which would look a lot like the current media management, but not based on content items. And then at the same time create some content types like Image that would have a Media Picker field and select one media, and optionally define custom content. This one would be draftable and localizable, with custom fields or taxonomies. Then in your content editors (body, markdown, ...) where you need to insert a file, the picker would expose the Media, not the content items. The content items would be used with a Content Item Picker if you need to reference more that just files. This would also solve the issue that we have to load a content item right now to be able to inject an image url. We would still use a specific tag to reference a relative file path, like Another option would be to keep Media as content items, but have the content editors use the file system directly, but that would require two different pickers, more work. Profiles Profiles (as in predefined named sets of filters ) can be done later, as long as we can already apply filters when we insert a media, or use them from a view (using a tag helper). So from a body we would have something like I think we could also leverage the File Picker by exposing templates for it, and even expose |
Forgive me for not having had a moment to check out the O2 media branch yet, but here are my 2 cents worth based on O1. Content ItemsI have dearly missed some functionality ever since the move from MediaPicker to MediaLibrary:
With regards to still needing Content Items, just thinking out loud:
User ExperienceEnd-user experience with uploading and organising media has been a drama in O1. Of course, this is end-user "error", but I'm sure we can do more in terms of configurable features that make uploading media more transparent (read: very, very facebook-style easy) to the novice end-user:
Injecting Media URL'sI've always argued that URL's injected by the picker et al should be relative (or a tag as being described above) and be rewritten to the local media path, CDN, blob storage, etc. based on the environment settings. This is also crucially important when moving domains and is WP's horrid achilles heel. The tag solution as described by @sebastienros sounds perfect in what it can achieve, especially if a hook can be included for 3rd party modules to transform the final element rendering. In addition, I would also consider that, in the WYSIWYG editor, images can be resized and may have to get cut down to that size (See discussion) SEO
StorageWe should be able to plug in any (3rd party module) storage provider, from local file system to cloud-based (central storage is crucial for a load-balanced environment), and, depending on the storage provider's capabilities:
Import & UploadTo ease the pain of uploading (especially on a slow connection), I would suggest renaming O1's "Import" to "Upload" and re-purpose "Import":
Import Provider modules could provide, for example, the following functionality:
Profiles and FiltersI'd be perfectly happy not to have profiles at all, as long as we can specify an array of filters (in order!) to be applied, together with parameters, something like Filters should specify something like a We use profiles extensively, but the O1 workflow is not very atomic when used in views. Before deployment, you first must make sure the profile exists, names match, sizes match the attributes, etc. Anything that can be under source control has my vote. Per UserIndeed we should differentiate between managing your own, publicly accessible media and per-user secured storage. The latter has recently become a requirement for us, but this is being solved outside of Orchard. Having said that... killer feature :) *Serving Media Relative to SiteThis is our favourite internal recurring topic and difficult to solve, although we did have a solution in O1, it was difficult for various reasons. The end-goal is that, no matter where media is stored, it will (also-) always be available under http://my.domain.com/Media/Tenant/.. The O1 implementation of storage providers, such as Azure Blob Storage, turned the blob storage more into a CDN than just storage. I'd suggest to put this right and only use this as storage backing, with the media still being served under the site. If a particular setup still wishes to use the storage provider directly, it can be done by setting something like a Some CDN's have the ability to automatically set the rel=canonical HTTP header based on the source, but perhaps it makes sense to to add this in Orchard by default? In any case, it would be very easy to add on most webservers. |
Thanks @anoordende that's very informative. Not sure you watched the video from two weeks ago as I talked about some of these points and came to the same conclusion as you. We will go back to a file based media screen that will reflect the actual files on the FS. Also use relative path to link to media, or apply transformations using tokens. We are keeping the possibility of having content media items, but this will be optional, and kind of natural like any other content type, by using a File Picker in a custom type. The CDN s. Azure blobs makes totally sense, as I came to the same conclusion. I was wrong when I designed it. So now the Azure Blob will just be a file store, and the image filters will use an independent cache storage. CDNs will query the server based url, and the server will transform the image live, while the CDN can then cache the result, and we can also store it locally (not in the same media files folder) if we don't want to rely on a CDN. |
The Attachment Part can be done after beta. We can have custom tags/filters to depict the differences from a media that comes from
|
Can Media Design be closed? Many features have been implemented. If we plan to implement other features, we should create specific issues. |
Before I even start thinking about the design of this feature, I want people to comment on the existing implementation (Orchard1) or suggest changes.
The issue includes these topics
Some open questions to start the discussion:
Overall I think what is in Orchard 1 is perfect, but I also think some features are not really as useful or popular as I had imagined (profiles, import sources).
/cc @Piedone @bleroy @anoordende @jeffolmstead
The text was updated successfully, but these errors were encountered: