-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature Request: Allow Notebooks to programmatically attach / remove/ update files to themselves. #175
Comments
I had intended to create a similar issue, but scrapped it because there were too many open questions. The problem it was meant to solve: cache the results of costly calculations and/or restricted fetches in file attachments, with an option to update them. Some of the notes:
An alternative I had considered was to create a draggable file object that could be dropped on the Upload area. Unfortunately this wasn't possible due to the notebook's sandboxing (afaik). |
Thanks for raising this feature request. It is related to an idea that we have about allowing a cell to be saved as a file attachment. That way, when you wrangle a data source (potentially from a database query, or a large dataset, or a private dataset), into something you would like to use in your visualization, you can then save that file as an attachment (in the UI) and use that file going forward. It would assist in this fairly generic workflow:
Is this a workflow that would solve your case, @triptych ? |
Yes, I think this "wrangle the data" and get some kind of output is a gap that this would fill nicely. I read about the kind of special needs for something like this in the data vis world, and would be perfect for my own use case of small tools that allow developers to create things and share them within the same notebook. This would also I think encourage collaborative notebooks as well. |
I have a related need:
A simple authenticated HTTP POST would be sufficient to update a named attachment. |
Is your feature request related to a problem? Please describe.
If I am the owner of a notebook, I would like to be able via an Observable API to programmatically attach files to that notebook.
Scenarios:
Describe the solution you'd like
CRUD actions on FileAttachments via a JS api. They would still follow the same file size restrictions as normal file attachments, size amt, etc. Bonus points for being able to update a file inside an attached ZIP archive.
Again - this api would only work for the owner of the Notebook. It would simply be a convenience api around creating, updating, reading, and deleting FileAttachments.
Describe alternatives you've considered
Current alternatives are the manual creation / delete / upload via mouse clicks.
Use of LocalStorage works only for the current viewer of the notebook.
Additional context
Having a virtualized file system api would lead to some fantastic uses for Observable Notebooks with only a small addition to it's functionality.
The text was updated successfully, but these errors were encountered: