Get /files/ unmodified from contents

request raw files instead of parsing notebooks

avoids reserializing (inconsistently) on download of notebooks.
This commit is contained in:
Min RK 2015-03-09 09:40:15 -07:00
parent c5f20e9481
commit a4321ccf5a

View File

@ -28,12 +28,12 @@ class FilesHandler(IPythonHandler):
else:
name = path
model = cm.get(path)
model = cm.get(path, type='file')
if self.get_argument("download", False):
self.set_header('Content-Disposition','attachment; filename="%s"' % name)
if model['type'] == 'notebook':
if model['type'] == 'notebook' or name.endswith('.ipynb'):
self.set_header('Content-Type', 'application/json')
else:
cur_mime = mimetypes.guess_type(name)[0]