How to append data to existing Dropbox file?

安稳与你 提交于 2019-12-13 15:25:35

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!