Replies: 2 comments 1 reply
-
I am doing this right now with an |
Beta Was this translation helpful? Give feedback.
-
Thank you, @Fil . Reflecting on the nature of Framework, what I am thinking about probably isn't tenable--even if I can write data back to a local data object, it might not work to be able to reference that object without rebuilding the site? The broader context of what I am exploring is this: If I have a multi-page site, each page can reference a central data object, but changes to inputs on one page don't appear on my other pages. To get around this, I have been making an 'ephemeral' data object in the browser memory, then calling on that object in other pages instead of calling on the original. (e.g. https://observablehq.com/@aaronkyle/ephemeral-data-changes) This sorta works (and allows quasi persistent changes), but at some point I'd like to be able to write back my updates more permanently without manual intervention -- like after deploying an app to cloud. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Does Observable Framework make it possible to write data back into a local file that is saved in a Project folder and referenced as a file attachment – such that you could change the locally-stored data object with the notebook and the updated values would be used next time you load the application?
My assumption is no: the browser still runs in a sandboxed environment that prevents access to the local file system.
But how about with the File System Access API? … Looks like it might be possible, but only with Edge? [ref: Window: showSaveFilePicker() method - Web APIs | MDN]
I’d be interested if anyone could share an example of using Framework to persist changes to data in a relatively simple way.
Beta Was this translation helpful? Give feedback.
All reactions