jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
141 stars 29 forks source link

Images don't display #229

Open davidbrochart opened 6 months ago

davidbrochart commented 6 months ago

See https://github.com/jupyterlab/jupyter-collaboration/issues/162#issuecomment-1821349112.

Description

In RTC images won't display.

Reproduce

  1. Install JupyterLab and jupyter-collaboration.
  2. Open an image from the file browser.
  3. See image not shown.

Expected behavior

Images should be displayed. Jpterm is able to show images using a YBlob.

Context

davidbrochart commented 6 months ago

With jupyter-collaboration installed, even if I'm not in an active collab session, the image gets uploaded with RTC.

What do you mean "the image gets uploaded"?

BwL1289 commented 6 months ago

Apologies for the confusion. Should have said - "With jupyter-collaboration installed, even if I'm not in an active collab session, and if i upload an image to jupyterlabs, the image gets uploaded with RTC."

did that clarify?

davidbrochart commented 6 months ago

So your issue is not that double-clicking on an image in the file browser doesn't show the image? I don't really get what it means that the image gets uploaded with RTC.

BwL1289 commented 6 months ago

Let me clarify.

My issue, like yours, is that images don't display after I upload them and try to view them from the file browser.

I was also commenting that even when I'm not in an active collaboration session, and I upload an image, the image is marked as being uploaded with RTC. See screenshot. Perhaps this is expected behavior. I'm not familiar enough with the framework to know. Screenshot 2024-01-04 at 12 44 03 PM

davidbrochart commented 6 months ago

Oh I see now, thanks! Yes the RTC: prefix in the path identifies the drive, but this is not the issue here. The problem is that the frontend asks for a document of type file, which corresponds to a YUnicode shared document, but this doesn't handle binary data. Instead, it should ask for a blob which correspond to a YBlob.

BwL1289 commented 6 months ago

Ack! Appreciate the clarification!