Open lordi opened 7 years ago
What do you think of these changes to the protocol?
{:rename, old_hash, new_hash}
-> {:ok} | {:error, reason}
I'm not sure how we want to deal with renaming a file.. Do we end up changing all revisions and pretend they all were for a file with the new hash? Not sure if that even works with the current way we encrypt files. I'd assume we'd need to at least re-upload the metadata along with the new hash for the encryption to work out?
{:delete_file hash}
-> {:ok} | {:error, reason}
As for renaming, thats a good question. I think intuitively I'm against just renaming all revisions, but it has alot of benefits (eg. the history of the file is retained).
We indeed need to re-upload the metadata because the filename inside of it changed obviously.
Delete file is implemented in Branch sign-chain.
There should be two commands (remove and rename) to allow the user to explicitly handle file changes.