Add mimetype additions in studio startup
This commit is contained in:
@@ -14,3 +14,19 @@ def run():
|
||||
Executed during django startup
|
||||
"""
|
||||
autostartup()
|
||||
|
||||
add_mimetypes()
|
||||
|
||||
|
||||
def add_mimetypes():
|
||||
"""
|
||||
Add extra mimetypes. Used in xblock_resource.
|
||||
|
||||
If you add a mimetype here, be sure to also add it in lms/startup.py.
|
||||
"""
|
||||
import mimetypes
|
||||
|
||||
mimetypes.add_type('application/vnd.ms-fontobject', '.eot')
|
||||
mimetypes.add_type('application/x-font-opentype', '.otf')
|
||||
mimetypes.add_type('application/x-font-ttf', '.ttf')
|
||||
mimetypes.add_type('application/font-woff', '.woff')
|
||||
|
||||
@@ -35,6 +35,8 @@ def run():
|
||||
def add_mimetypes():
|
||||
"""
|
||||
Add extra mimetypes. Used in xblock_resource.
|
||||
|
||||
If you add a mimetype here, be sure to also add it in cms/startup.py.
|
||||
"""
|
||||
import mimetypes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user