By Default EC2 does not include mime types for fonts except svg in /etc/mime.types
So need to add them to the system
Below code example tells you how to do that in python
import mimetypes
..
mimetypes.init()
mimetypes.add_type('font/ttf', '.ttf')
mimetypes.add_type('font/opentype', '.otf')
mimetypes.add_type('application/font-woff', '.woff')
mimetypes.add_type('application/vnd.ms-fontobject', '.eot')
For more Information please visit https://docs.python.org/2/library/mimetypes.html
No comments:
Post a Comment