Greetings! I did a quick search for a similar bug, but didn't find anything, sorry if this is a dupe :)

This patch loads the allowed file extensions from the media type when displaying the upload widget.

Thanks!

CommentFileSizeAuthor
allowed_extension.patch967 byteskevin hankens

Comments

JacobSingh’s picture

Status: Active » Closed (duplicate)

There is another issue for this somewhere. sorry, don't have the time to search at the moment. The issue is that media type is not only determined by extension, it can be determined from mime-type also... We could make the type detection less robust for the sake of UX, but hopefully there are other solutions.

At any rate, just allowing extensions there isn't totally going to fix it.

Best,
Jacob

jerdavis’s picture

Status: Closed (duplicate) » Needs review

I feel like perhaps this was closed without due consideration. This patch looks like it would fix some problems we're also seeing with Media. Namely related to this issue:

http://drupal.org/node/870728

While your stop-gap fixed MP3, we need to be able to enable other extensions, such as docx, xlsx, etc. Rather than using a hard-coded list stuck in a system variable with no UI, why not use the extensions defined on the media types? It seems like a logical solution, even if there are other considerations - is it not a better approach?

stephthegeek’s picture

Status: Needs review » Closed (duplicate)

Jacob closed this as a duplicate, not as a won't fix. It's being discussed in more detail with patches in #983924: Improve usability of configuring media types / extensions and allowing uploads for those extensions