API allows for duplicate file names in the same folder
Using the API via the python SDK, when I upload the same file (name) multiple times to the same folder, a new file object gets created every time.
I was expecting the previous file to be overwritten, or the request to fail (the API doc says that upload will "Returns an error if the file already exists, or the account has run out of disk space.") like for the folder creation.
I was wondering what is the expected behavior when multiple files with the same name are uploaded to the same folder ?
-
I think you want to use the update version api rather than the new file endpoint. Here's a link to that sample code!
https://github.com/box/box-python-sdk/blob/main/docs/usage/files.md#upload-a-new-version-of-a-file
投稿コメントは受け付けていません。
コメント
1件のコメント