Closed skovhus closed 11 years ago
We probably won't be extending internal mime-to-extension map anymore - already quite large. Alternatively, in Plupload 2 we've exposed a method that you can use to extend it yourself.
Examples and instructions here: https://github.com/moxiecode/plupload/issues/682#issuecomment-12321058
That makes sense -- thanks for the quick reply. We are already extending the 1.5.5 mimetypes...
Any news on when the 2.0 is ready for production (or as stable as the version 1.5.5)?
In Plupload 1.5.4 we’ve simply extended plupload.mimeTypes as follows:
plupload.mimeTypes['3gp'] = 'video/3gpp';
This works fine, but there are certain extensions that still don’t work under Chrome html5:
plupload.mimeTypes['flv'] = 'video/x-flv';
plupload.mimeTypes['mkv'] = 'video/x-matroska';
Does the new Plupload 2 API do something additional under the covers that would make these troublesome file extensions work? I’m Googling this now, and will probably also dig around the latest Plupload source, but would love to save time if you could explain off the top of your head.
Thanks!
@skovhus, it is more ready than it is not, I still have to add some unit tests for image handling though. I'm going to schedule stable Plupload 2 release for next thursday. Should be somewhere there.
@inghamc, whole accept mime type approach is quite inconvenient and erroneous, not sure why they've ended up with mime types and not extensions, after all contents of the file are never inspected (after checking webkit source I can say that they do inspect magic numbers, but for quite limited set of formats). Plupload 2 does nothing special under the hood, since there is nothing special to do anyway. flv
definitely worked fine and we even have this mapping internally. One thing you can try is map flv
and mkv
to generic mime type video/*
rather than specific one. According to compatibility tables it should do.
Let us know about your findings if you stumble on something interesting :)
When updating the mimetypes next time, I would love to see these added:
odp (open office presentation) application/vnd.oasis.opendocument.presentation
odt (open office text file) application/vnd.oasis.opendocument.text
sxi (star office presentatin) application/vnd.sun.xml.impress
sxw (start office text document) application/vnd.sun.xml.writer
wpd application/wordperfect