jupyter_server icon indicating copy to clipboard operation
jupyter_server copied to clipboard

Serving files from the content API

Open oeway opened this issue 5 years ago • 3 comments

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.

oeway avatar May 07 '20 17:05 oeway

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.

Zsailer avatar May 14 '20 15:05 Zsailer

Sounds generally sensible to me on another endpoint.

saulshanabrook avatar May 14 '20 15:05 saulshanabrook

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?

krassowski avatar Dec 31 '21 19:12 krassowski

Closing as answered, the documentation issue is tracked in https://github.com/jupyter-server/jupyter_server/issues/298

blink1073 avatar Jan 05 '23 16:01 blink1073