No `modifyFile` launcher/rest api

Just for my own clarity with safe-js, there’s no backed in way with 0.5 APIs to rewrite a files contents, or?

You’d need to delete/recreate the file (a PUT only updates name/metadata). Correct?

If so, I’ll probably make a helper function for this in safe-js

3 Likes

Yes :slight_smile:

Not yet. It’s explained here:

The update file endpoint has been temporarily deprecated. Currently SequentialEncryptor is used via safe_core to write chunks as and when available which does not support taking offsets. Once the self_encryption crate can support taking offsets while also writing chunks to the network as and when chunks are formed, the update file endpoint will be re-enabled. At present the workaround for modifying a file will be to delete and create it again as a new file.

Source: https://api.safedev.org/nfs/file/

5 Likes

Cool. Thought so. Thanks for clarifying :thumbsup:

1 Like