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

woff mime type #183

Closed
pkra opened this issue Feb 21, 2014 · 3 comments
Closed

woff mime type #183

pkra opened this issue Feb 21, 2014 · 3 comments

Comments

@pkra
Copy link

pkra commented Feb 21, 2014

By default, WOFF files are stored with application/x-font-woff. This works but throws warnings in some browsers.

The WOFF spec specifies application/font-woff.

For reference, http://stackoverflow.com/questions/3594823/mime-type-for-woff-fonts

@mfschwartz
Copy link
Contributor

The behavior you're seeing is caused by Python's mimetypes.guess_type call (http://docs.python.org/2/library/mimetypes.html). It would be difficult to update the mapping in that library.

If you're running on Linux or MacOS you might try setting use_magicfile=True in the GSUtil section of your boto config file. That causes Unix "magic" file recognition of content type, which is often more robust and up-to-date (and, it's user-customizable). (See 'gsutil help metadata' for details.)

I'm closing this issue because we don't want to get gsutil into the business of trying to track file type->mime type mappings.

@pkra
Copy link
Author

pkra commented Feb 21, 2014

Thanks for the clarification and suggestions.

@FossPrime
Copy link

@mfschwartz There is an API for setting global default ACL's... why isn't there one for setting global default mime for specified extensions... Like VTT or Woff

Seems like basic important functionality for static file hosting

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