-
Notifications
You must be signed in to change notification settings - Fork 72
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
Access to the local file system #469
Comments
No, not currently. There are deep technical reasons that makes using these kinds of browser APIs difficult in webR. We're tracking this in #56
Can you please tell me more about your setup? Are you running webR from the REPL at https://webr.r-wasm.org/latest/, or in your own webR application? How are you uploading the sqlite database to the virtual filesystem? Are you using the webR JavaScript API? Can you create a small self-contained example of your use case for me to experiment with? If you are using your own application there is a possibility for persistent storage, but it requires that webR is loaded using the dir.create("/data")
webr::mount(mountpoint = "/data", type = "IDBFS")
webr::syncfs(TRUE) Write to the directory by writing to write.csv(mtcars, "/data/mtcars.csv")
webr::syncfs(FALSE) Then, when the mountpoint is mounted in the future (say, after the page has been refreshed), the data will be available again after running There are some subtleties here, since the underlying mechanism is asynchronous. Some more documentation is available at: https://docs.r-wasm.org/webr/latest/mounting.html#indexeddb-filesystem-storage |
I was using https://webr.r-wasm.org/latest/
I was using Upload file from the main UI and trying to upload a 261MB Sqlite file. While I was able to upload lighter sqlite, the 261MB one failed.
I'm following this project for nearly 2 years. My main goal was to implement dynamic complexes tabulation with data stored on remote servers: PostgreSQL and MySQL. However, until now, I never try a demo since I'm still waiting access to remote database in the API. This could be changed if you implement this: #490 |
Since my last post, a lot of progress has been done with WebR. And, I'm coming back with a new request...
a) Can we use this new API : https://developer.chrome.com/blog/persistent-permissions-for-the-file-system-access-api
for accessing/using and saving files ( for example, downloaded packages) to and from the local file system?
In the meantime, do you have a workaround for accessing to a sqlite database stored in the local file system without any api call?
I tried to upload it to a new directory created in the virtual file system and use
without any success...
it display
Error in setwd(file.path("/", "Sqlite", "inv_Agr.db3")) :
cannot change working directory
The text was updated successfully, but these errors were encountered: