set mime-type on /files/

pull/437/merge
Min RK 11 years ago
parent cc1f01d21e
commit 6ec427b523

@ -40,6 +40,11 @@ class FilesHandler(IPythonHandler):
cur_mime = mimetypes.guess_type(name)[0]
if cur_mime is not None:
self.set_header('Content-Type', cur_mime)
else:
if model['format'] == 'base64':
self.set_header('Content-Type', 'application/octet-stream')
else:
self.set_header('Content-Type', 'text/plain')
if model['format'] == 'base64':
b64_bytes = model['content'].encode('ascii')

Loading…
Cancel
Save