API for BOX version overwrite uploads
回答済みHow can I use the BOX upload API to overwrite the version of an existing file?
-
Hi
You can use this API https://developer.box.com/reference/post-files-id-content/ to upload a new version. You need to know the fileID of the existing version
Best regards, Peter Christensen, Platform Solutions Engineer, Box
-
Thank you for sharing your knowledge.
I tried to implement it with your reference, but the version was updated, but at the same time the contents of the file disappeared.
I am not sure what is causing this. -
Not sure what you mean by the contents of the file 'disappeared'?
If you use this API https://developer.box.com/reference/get-files-id-versions/ you should see a list of all file versions and their sizes. If you successfully uploaded a new version with a non-zero byte size it should show in the list
Rgds,
Peter -
I checked the version of the target file from a web browser, and V1 was uploaded successfully after referring to the following URL.
https://ja.developer.box.com/reference/post-files-content/However, for V2 and later, I tried using the following URL that you shared, but the byte size became 0 and the contents of the file disappeared.
https://developer.box.com/reference/post-files-id-content/ -
Thanks for the advice.
I reviewed it and it works.
I apologize for the inconvenience.
投稿コメントは受け付けていません。
コメント
6件のコメント