Save a new version
Last updated
Was this helpful?
Last updated
Was this helpful?
When you edit an existing file, a new version is stored inside the structured data associated with that file.
The app obtains a data ID handle for the versioned structured data (type tag 501) that contains the file you just edited. The ID of this structured data is based on your user prefix and the name of the file.
The app obtains a structured data handle using the data ID handle of the file you just edited.
After obtaining a structured data handle, the app drops the data ID handle of the file you just edited.
The app stores a new version inside the structured data associated with the file you just edited. It's encrypted using the cipher options handle previously obtained.
This new version includes the Markdown content and the current time (encoded as a base 64 string).
The app saves the new version of your file by sending a POST request to the SAFE Network.
The app of the file and displays them in the UI.