fission-codes / fission

Fission CLI & server
https://runfission.com/docs
119 stars 14 forks source link

Update append endpoint to not overwrite #618

Open bgins opened 2 years ago

bgins commented 2 years ago

@expede and I were discussing the in-progress append endpoint feature on the append-endpoint branch. In the current implementation, files that are uploaded to the endpoint will replace existing files, an action which should require Destroy or Super_User capability.

Appending should not replace files, but instead it should keep copies of the old files available when adding a new file with the same name.

A bit of design will be needed here. Say a user has previously uploaded a cat.jpg to an app. Later, they upload a second file also named cat.jpg. Is the original file renamed to cat2.jpg? Or should the new file be named cat2.jpg?

Let's discuss our options and how they will work for developer use cases.

bmann commented 2 years ago

This is after a first release. So for now — overwrite files with the same name.

iCloud / Apple MacOS do cat 2.jpg (Space and next number)