问题
I'm accessing Dropbox API to upload and download files using Java. Now, I need to create a function which can append data to existing Dropbox file. I've a working code which first downloads a file and then uploads it with the text appended. However, is there is a better way to do this, because my code has is inefficient?
Thanks in advance. :)
回答1:
Conventionally there is no support for direct file editing in Dropbox, so what you looking for is not supported in existing APIs of Dropbox, possibly what you are doing currently,
first downloads a file and then uploads it with the text appended
is the best (and the only) way of modifying files in Dropbox cloud.
But apart from this it does support file revision mechanism, which can be achieved with help of /delta, /revision
A way of letting you keep up with changes to files and folders in a user's Dropbox. You can periodically call /delta to get a list of "delta entries", which are instructions on how to update your local state to match the server's state.
https://www.dropbox.com/developers-v1/core/docs#revisions
Best Luck :)
来源:https://stackoverflow.com/questions/38672917/how-to-append-data-to-existing-dropbox-file