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

Wrong mime type set for webm & webp #1019

Closed
rmayhue opened this issue Apr 4, 2018 · 2 comments
Closed

Wrong mime type set for webm & webp #1019

rmayhue opened this issue Apr 4, 2018 · 2 comments

Comments

@rmayhue
Copy link

rmayhue commented Apr 4, 2018

LoeFS is setting an incorrect mime type for both '.webm' & '.webp' in leo_mime.erl.

Line #L422 should be <<"video/webm">>
Line #L424 should be <<"image/webp">>

I found a reference to leo_mime.erl in issue #179. I was trying to use s3cmd modify -m image/webp <OBJECT> to set the correct mime type when I realized that LeoFS must be setting the mime type internally on upload and not allowing me to modify it after the fact.

I would have submitted a pull request, but it's such a small change that I figured opening an issue was easier.

This is probably a separate issue, but do you have plans to allow LeoFS to modify/override the mime type in future versions? Or is it possible now and I'm just not seeing it?

Thanks!

@yosukehara
Copy link
Member

@rmayhue Thank you for your report. I've recognized those mime types are incorrect as you mentioned.

[Correct]

Extension Kind of document MIME Type
.webm WEBM video video/webm
.webp WEBP image image/webp

I would have submitted a pull request, but it's such a small change that I figured opening an issue was easier.

If you have time, could you send a PR?

This is probably a separate issue, but do you have plans to allow LeoFS to modify/override the mime type in future versions? Or is it possible now and I'm just not seeing it?

The latest version does not support it yet. We'll consider how to realize your request, "modify/override the mime type".

@yosukehara
Copy link
Member

@rmayhue Thank you for your contribution. Your PR has been merged, so closed this issue. I've opened another issue, #1020 to satisfy your request.

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

No branches or pull requests

2 participants