ERROR:
The file 01 Going Under.mp3 could not being uploaded. Only files with following extensions are allowed: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp

I guess the system is using the general file upload extensions. But why do we have to choose a media type than?

Comments

JacobSingh’s picture

Indeed, this was added to core. I'm not sure why, but we do need to fix it in Media.

aspilicious’s picture

Priority: Normal » Critical

Bumping this to critical cause at this moment I can't upload any mp3...

pyc’s picture

Choosing media types should be custom, not added to core... As far as I understand, right now, practically it's impossible to upload mp3?

JacobSingh’s picture

I think this may be resolved now because of http://drupal.org/node/901728#comment-3409804.

See the comments after that too. As of now, there is no way to filter by extension unless we provide a whitelist :( This is kinda a problem in core, but anyway, it is wide open now.

If it is working, please close this.

-J

aspilicious’s picture

#4 read that issue. Didn't test it yet, but if we apply that patch this issue should be fixed?

brunodbo’s picture

After downloading the latest dev release (which contains the patch in #4), mp3's won't get uploaded.

JacobSingh’s picture

Still have an issue here. Needs to resolved more holistically.

See: http://drupal.org/node/901728#comment-3410032 where the problem started and a description of it.

effulgentsia’s picture

Subscribing. Yes, we need to solve this in a proper, secure, robust, extensible, pluggable way.

Jackinloadup’s picture

subscribe.. need to upload videos... mp4

JacobSingh’s picture

Status: Active » Fixed

As a stop gap, I just changed the list of allowed extensions in media.variables.inc. Needs to have a settings form and be smarter with defined types and their extensions. For now though, just the default core list + a few no brainers.

Patch:

[jacob@jacob-mbp media]$ cvs diff -u includes/
cvs diff: Diffing .
cvs diff: Diffing includes
Index: includes/media.variables.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/includes/media.variables.inc,v
retrieving revision 1.10
diff -u -r1.10 media.variables.inc
--- includes/media.variables.inc	16 Jul 2010 20:42:49 -0000	1.10
+++ includes/media.variables.inc	16 Sep 2010 01:52:42 -0000
@@ -128,7 +128,8 @@
 
       // Name of the theme to use in media popup dialogs
       'dialog_get_theme_name' => 'seven',
-      'file_extensions' => '',
+      // @TODO: Make a configuration form with this.
+      'file_extensions' => 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp mp3 mov m4v mp4 mpeg avi ogg wmv ico',
       'max_filesize' => '',
       'debug' => FALSE,

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lefko’s picture

Hi,
I am relatively new to drupal. I am running on a windows xp machine using wamp. I just checked and it looks like both the patches are installed, but I still have this problem. It would be really nice to be able to load audio and video on the same page.

santam’s picture

Well after a lot of hunting around finally got the solution thanks. Just needed to add the swf extension to file as Jacobsingh says to be able to upload it using the file uploader widget in a media field