Restrict upload mime types #176
Replies: 2 comments 3 replies
-
I think this would be a great feature request! I too think it would be a nice experience to block certain mime types by "graying them out" right in the upload UX, as other apps do. To get that to work, we'd need a config-based approach. It would be pretty easy though. That would also alleviate the need to write a custom hook or, better yet—validator on the We'll get that done no problem. Good call! |
Beta Was this translation helpful? Give feedback.
-
This feature has been released in 0.6.8! The configuration is used for both the file picker and validation on the server. |
Beta Was this translation helpful? Give feedback.
-
So I read again through the docs, but could not find any suggestion how to limit uploads to a certain mime type. I'm sure I could just use a hook and check the incoming data before saving and return an error, but for the user experience it's a lot nicer if the input on the client "blocks" certain filetypes (by hiding them) at least on the surface. You'd still need to do a check on the server though.
Any suggestions on how to tackle something like this? Or do you guys think it's enough to just check once upoaded?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions