The MU forums have moved to WordPress.org

m4a file type (11 posts)

  1. hawaiian
    Member
    Posted 16 years ago #

    I can't seem to add new filetypes to be uploadable. I've added "m4a" and "mp4" to the Upload File Types field under Site Admin > Options but no luck.

    When I try to upload a m4a file, I get the generic error message:

    File type does not meet security guidelines. Try another.
    Back to Image Uploading

    Any help would be greatly appreciated...

  2. drmiketemp
    Member
    Posted 16 years ago #

    I believe you also have to add it into the wp-content/blogs.php file.

  3. Farms
    Member
    Posted 16 years ago #

    Hmmm... we've had trouble with m4a files too.

  4. hawaiian
    Member
    Posted 16 years ago #

    Thanks drmike for pointing me in the right direction, got it figured out.

    FIX:
    Edit ../wp-includes/functions.php (around line 1210), change:

    'exe' => 'application/x-msdownload'
      ));

    To:

    'exe' => 'application/x-msdownload',
        'm4a' => 'audio/aac',
        'flv' => 'video/x-flv'
      ));

    Notice the comma added after 'x-msdownload'. I started by editing wp-content/blogs.php but that didn't work. I didn't remove the added mime types from blogs.php, so I'm not sure if it's a combination of the two that got it to work, just happy it's working now...

    Thanks!

  5. drmike
    Member
    Posted 16 years ago #

    Not a problem. Glad you got it worked out.

    Farms, does that look right to you?

  6. Farms
    Member
    Posted 16 years ago #

    Yep, it also works for other files, i.e.

    'notebook' => 'text/notebook',
    'isf' => 'text/isf'

    no need to edit blogs.php.

    Cheers, James

  7. donncha
    Key Master
    Posted 16 years ago #

    You should be able to use the upload_mimes filter to add new mime types there. Much better than changing a core file.

  8. drmiketemp
    Member
    Posted 16 years ago #

    Isn't that what the poster is trying to do in teh first post by adding in the extentions?

  9. Farms
    Member
    Posted 16 years ago #

    Heck, the last thing I like doing is changing core... for obvious reasons... but surely this is 'cos mimes doesn't support that file type beings added?

  10. hawaiian
    Member
    Posted 16 years ago #

    Is the upload_mimes filter the same thing as on the Site Admin > Options tab, or is this something else?

    I'd love to not have to touch core files...

  11. vinko
    Member
    Posted 16 years ago #

    Guys,

    I have the same issue as Hawariian and I too do not want to modify any of the WP files.

    Can someone please explain what Donncha means by "... use the upload_mines filter"?

About this Topic