-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Media Picker - restrict on file type (.svg, .mp4 etc) #4921
Comments
Maybe the "Allow items of type" should all be based on the media type similar to how MNTP use this for content type (document type). It should probably be considered how it should work with the existing options Would it be better to have a multi-picker to select the available media types instead of manual enter a comma delimited list of aliases? Maybe this multi-picker could also be used for document types and member types? The other part of this would be to restrict to select media items where it attached media is of a specific type, e.g. .svg, .pdf, .mp4, .mp3, etc. |
I come across this requirement often when creating media pickers for video displays. For example, I need a content type where the user must upload video files in multiple formats (mp4, webm & ogv) in order to create a HTML structure like this.. <video autoplay="" muted="" loop="" playsinline="" id="vid" preload="auto" poster="http://i.onionstatic.com/onion/1506/8/original/1200.jpg">
<source src="https://s3.amazonaws.com/micada.org/public/Newnew.mp4" type="video/mp4">
<source src="https://s3.amazonaws.com/micada.org/public/Newnew.webm" type="video/webm">
<source src="https://s3.amazonaws.com/micada.org/public/Newnew.ogv" type="video/ogv">
</video> MP4 I make mandetory and have to other two as optional, only rendering the associated source if they are uploaded. This means I need 3 separate media pickers, one specifically for each type. |
Hiya @madsrasmussen, Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more. We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed). To open it this issue up again, you can write For example:
This will reopen the issue in the next few hours. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
@umbrabot still relevant Ran into this requirement today. It would be great if we could somehow set only a pdf or a mp4 or whatever. |
@madsrasmussen @nielslyngsoe I wonder if this is considered for the new Media Picker v3? Maybe also restrict by media type similar to MNTP, which would make the "Pick only images" and "Disable folder select" obsolete. #8471 Furhermore "Minimum" and "Maximum" configuration properties would make it more consistent with Multi-URL Picker and MNTP and make it more flexible as the current configuration only allow a single or multiple - not e.g. restrict up to 5 or 10 items. |
Had the same request from a client today, would be great to see this feature in a future version. |
Good news then! The new media picker in the upcoming 8.14.0 does exactly this, can configure what media types are allowed per media picker restrict it with a min/max number of items as well. And when you create an upload field on a media type you can restrict it to exactly the extensions you want! So all of these feature requests are now covered and I'll close this one! 🙌 |
@nul800sebastiaan Does the above mention implementation of MediaTypes enable limiting the Media Picker to specific file types, and if so, how? In my specific use-case I want the user to only select images of type PNG. |
@Nikkelmann That said, you can achieve this by creating a new Media type. After that go to Media Type in settings and copy the image media type. This should create a PNG only media picker. If this doesn't work please open up a discussion on Our and I'll try to help you over there. |
Sometimes you need to restrict a specific media picker to a particular type of file. It could be cases where you only want to allow SVG upload, video uploads, etc. A pre value field to specify which file types are allowed in the data type would be amazing.
I imagine the functionality could work very much like the "Allow items of type" in the Multinode tree picker.
This item has been added to our backlog AB#4622
The text was updated successfully, but these errors were encountered: