jupyter_server
jupyter_server copied to clipboard
Serving files from the content API
As discussed with @Zsailer , the current get content api returns a json object which requires extra parsing in order to be used.
One thing we want to have in ImJoy is an endpoint that can serve the files directly with the correct MIME type in the Content-Type header so the browser can render these files directly, like the /view endpint from the notebook(but it doesn't always give the correct mime type).
I think I can build a server extension for it, but definitely nice to have it built-in with the content api.
Pinging @saulshanabrook and @telamonian. They've been thinking about the future of the contents API quite a bit, so I'd like to loop them in here.
Sounds generally sensible to me on another endpoint.
How would that differ from existing /files/ endpoint?
https://github.com/jupyter-server/jupyter_server/blob/606487adbbade8483bc804e4b7010dbfce77c131/jupyter_server/files/handlers.py#L14-L79
I now it is not a part of the contents API, but would it be a good idea to include it in the documentation?
Closing as answered, the documentation issue is tracked in https://github.com/jupyter-server/jupyter_server/issues/298