Make WordPress Core

Opened 14 years ago

Closed 12 years ago

#14659 closed defect (bug) (fixed)

Incorrect mime type served for some uploaded files

Reported by: recoilfx's profile recoilfx Owned by: markjaquith's profile markjaquith
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.0.1
Component: Upload Keywords: has-patch commit
Focuses: Cc:

Description

I used "upload_mimes" filter so that I can add additional allowed upload files types, however, there is a problem when serving these files.

It seems that ms-files.php does a short init, which skips the plugin files that registers the additional mime definitions.

So if I am trying to serve a Mathematica .nb file(which has the mime type application/mathematica, but it really is a text file), the file will be either served as a mime type of text (if mime_content_type exists) or image instead of the proper 'application/mathematica'.

Attachments (1)

webm.diff (413 bytes) - added by wonderboymusic 12 years ago.

Download all attachments as: .zip

Change History (13)

#1 @recoilfx
14 years ago

  • Summary changed from Incorrect mime type served for some uploaded file to Incorrect mime type served for some uploaded files

#2 @hakre
14 years ago

  • Component changed from General to Multisite

Since shortinit was new to 3.0 I assume that this is a multisite related issue.

#3 @mdawaffe
14 years ago

  • Keywords close 2nd-opinion added
  • Milestone changed from Awaiting Review to Future Release

The SHORTINIT and it's limitations are intentional.

This should probably be documented as a good use case for sunrise.php.

#4 @ocean90
13 years ago

  • Keywords dev-feedback added; mime upload close 2nd-opinion removed

Related: #20136

@wonderboymusic
12 years ago

#5 @wonderboymusic
12 years ago

  • Keywords has-patch added; dev-feedback removed

ms-files is gone / going-away by default in 3.5, but .webm files should be in the allowed mime types list. .ogv is in there, webm should be too

About WebM:
http://www.webmproject.org/about/faq/

Patch attached

#6 @wonderboymusic
12 years ago

#20136 was marked as a duplicate.

#7 @DrewAPicture
12 years ago

+1 for adding .webm

#8 @nacin
12 years ago

  • Component changed from Multisite to Upload
  • Keywords commit added
  • Milestone changed from Future Release to 3.5

#9 @nacin
12 years ago

  • Milestone changed from 3.5 to Future Release

Did not mean to assign this to 3.5.

#10 @mcepl
12 years ago

  • Cc mcepl added

#11 @markjaquith
12 years ago

  • Milestone changed from Future Release to 3.6

#12 @markjaquith
12 years ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In 23229:

Add .webm (video/webm) to wp_get_mime_types(). props wonderboymusic. fixes #14659

Note: See TracTickets for help on using tickets.