mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
set notebook mime-type on download links
notebooks are not application/json, they are application/x-ipynb+json. This fixes Safari adding the JSON extension to notebooks on download.
This commit is contained in:
parent
715a6c02db
commit
8daac20e22
@ -43,7 +43,7 @@ class FilesHandler(IPythonHandler):
|
||||
|
||||
# get mimetype from filename
|
||||
if name.endswith('.ipynb'):
|
||||
self.set_header('Content-Type', 'application/json')
|
||||
self.set_header('Content-Type', 'application/x-ipynb+json')
|
||||
else:
|
||||
cur_mime = mimetypes.guess_type(name)[0]
|
||||
if cur_mime is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user