-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow file openers by to accept URLs #5885
Comments
This sort of thing is explored a lot in #4902 |
As well as in #2941. Incidentally, I recently moved both of those off the 1.0 milestone |
Thanks @jasongrout and @ian-r-rose for those links.
So the contents API doesn't have a way to get back metadata about a file without getting the contents. This could be added, by adding another Seems like MVP would just be for a file handler to get the |
The contents API can get back the metadata via the contents API by passing the |
Here are a couple of examples to get us started: jupyterlab/packages/rendermime-extension/src/index.ts Lines 46 to 71 in 12c1a01
jupyterlab/packages/docmanager-extension/src/index.ts Lines 457 to 472 in 12c1a01
|
It seems like this is possible now. I was able to add an item to the open with menu that allows me to get the URL of the file I opened without actually loading it:
EDIT: I was wrong, this gets the contents currently |
Is there any progress on telling lab to not send the contents in an opener? Getting a url is nice but if a large file is still being transferred it does not help that much. We get the model in the browser and then turn around and send it to another server. I would prefer to just get the just get the file name and the tell a server extension to post it. That way the data does not have to be sent twice. For large files this is a really big deal. |
As far as I know, there hasn't been any progress on this beyond the above comments (@saulshanabrook is probably the most likely one to have made progress on it). |
Today I am trying an approach of just getting the filename and telling a server extension that I wrote to upload the file. I am ignoring the model altogether. It is radically faster. I am sure the data is still being sent to the browser but since it is not accessed in the javascript thread it does not appear the affect performance.
The upload js code, uses a
|
I think I was treading some similar ground in a recent discussion on how to fix some file path handling stuff:
|
This is coming up in conversation right now. It appears that (at least now) the context object asynchronously fetches the content, so it will appear at first that the content isn't there, but when the context ready promise is resolved, the content should be there. |
I would like to register an opener for files that gets called with the URL of them instead of their contents.
The goal is for the user to click "Open With > My Custom Opener" and for me to get the URL of the file without loading the contents.
I would like to care of loading the contents myself, if/when I need them. Many applications do the loading themselves, so it is wasteful to load the twice.
I need this for my work on the databus, to allow users to open files with the databus. #5857
The text was updated successfully, but these errors were encountered: