You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
I am trying to sync a bunch of files from browserFS via the safenet library onto safenet but I get some problems with that in the browser and I am not sure, what is going wrong.
If I use the BrowserFS's fs.readFileSync() (which mimics the node js FS-module), it gives me a Buffer-Object, but passing that to safenet's nfs.updateFile doesn't work (it saves a json-to-string). While using fs.readFileSync(filename, 'utf8') appears to give me the string I can pass to updateFile, that fails on binary data (like PNG-files). Do you have any example of uploading a binary file via the safenet API? How are you doing it with buffers?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to sync a bunch of files from browserFS via the safenet library onto safenet but I get some problems with that in the browser and I am not sure, what is going wrong.
If I use the BrowserFS's
fs.readFileSync()
(which mimics the node js FS-module), it gives me a Buffer-Object, but passing that to safenet'snfs.updateFile
doesn't work (it saves a json-to-string). While usingfs.readFileSync(filename, 'utf8')
appears to give me the string I can pass toupdateFile
, that fails on binary data (like PNG-files). Do you have any example of uploading a binary file via the safenet API? How are you doing it with buffers?The text was updated successfully, but these errors were encountered: