Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional mimetypes #721

Closed
skovhus opened this issue Feb 26, 2013 · 4 comments
Closed

Additional mimetypes #721

skovhus opened this issue Feb 26, 2013 · 4 comments

Comments

@skovhus
Copy link

skovhus commented Feb 26, 2013

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

@jayarjo
Copy link
Contributor

jayarjo commented Feb 26, 2013

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: #682 (comment)

@jayarjo jayarjo closed this as completed Feb 26, 2013
@skovhus
Copy link
Author

skovhus commented Feb 26, 2013

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)?

@inghamc
Copy link

inghamc commented Feb 26, 2013

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!

@jayarjo
Copy link
Contributor

jayarjo commented Feb 27, 2013

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants