Add fromURLToFolder parameter to define target folder - #29
Conversation
|
Second thought on naming: |
Yes that's always an issue, also something seen in JupyterLite with the REPL query arguments. Not sure there is a good way to handle this properly except maybe trying to make the argument more unique, like this suggestion. |
|
btw feel free to merge and make a new release if you need that change for the plugin playground and JupyterLab. |
There was a problem hiding this comment.
Pull request overview
Adds support for uploading and opening fromURL resources into a specified destination folder, with accompanying documentation and CI/docs build environment updates.
Changes:
- Add
fromURLToFolderquery parameter handling to uploadfromURLfiles into a target folder (creating directories as needed) and restore the prior filebrowser directory afterward. - Remove handled query parameters from the URL after processing (
fromURL,fromURLToFolder). - Update docs/readme and modernize docs/CI configuration (ReadTheDocs + artifact actions + docs conda env).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Implements folder-targeted uploads, directory creation, sequential open behavior, and query param cleanup. |
| README.md | Documents the new fromURLToFolder usage with examples. |
| docs/environment.yml | Updates docs build environment dependencies (JupyterLab/Node/JupyterLite). |
| .readthedocs.yml | Updates ReadTheDocs build image/tooling selectors. |
| .github/workflows/check-release.yml | Bumps artifact upload action version. |
| .github/workflows/build.yml | Bumps artifact upload/download action versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fromURLToFolder parameter to define target folder
|
I love this feature! However, note that there are potential security issues here - nbgitpuller faces the same ones, as described in jupyter/docker-stacks#2000. You can construct a link that pulls an arbitrary file into being My approach to dealing with this in nbgitpuller was to try to have a setting that lets hub admins who care about it turn that off (we never actually did it though). Perhaps we could do that from the start here? |
|
Thanks for that @yuvipanda, that's a valid concern. Isn't that already possible on Where is the concerning increase in the surface here? The |
|
Yeah, I realize .bashrc is already the case :) So don't let that concern block you here, but just something to keep in mind. |
|
Testing: I noticed the extension is not installed correctly in the docs env, we must be missing something. |
|
working on fixing this :) |
krassowski
left a comment
There was a problem hiding this comment.
Tested across a number of edge-cases, looks good - thank you!

Closes #28
This PR adds a
fromURLToFolderquery parameter to control where files opened via fromURL are created. When folder is provided, the extension creates missing directories, uploads all requested files into that folder in order, opens them, and restores the previous file-browser directory afterward. It also removes handled query params (fromURL and fromURLToFolder) from the URL after processing and updates the README with the new usage.