如何将数据附加到现有的Dropbox文件?

时间:2021-03-10 13:58:50

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?

我正在访问Dropbox API以使用Java上传和下载文件。现在,我需要创建一个可以将数据附加到现有Dropbox文件的函数。我有一个工作代码,首先下载一个文件,然后上传附加文本。但是,有没有更好的方法来做到这一点,因为我的代码效率低下?

Thanks in advance. :)

提前致谢。 :)

1 个解决方案

#1


2  

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,

传统上不支持Dropbox中的直接文件编辑,因此现有的Dropbox API不支持您所寻找的内容,可能是您目前所做的,

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.

是Dropbox云中修改文件的最佳(也是唯一)方式。

But apart from this it does support file revision mechanism, which can be achieved with help of /delta, /revision

但除此之外,它确实支持文件修订机制,可以在/ 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.

一种让您跟上用户Dropbox中文件和文件夹更改的方法。您可以定期调用/ delta来获取“delta条目”列表,这些条目是有关如何更新本地状态以匹配服务器状态的说明。

https://www.dropbox.com/developers-v1/core/docs#revisions

https://www.dropbox.com/developers-v1/core/docs#revisions

Best Luck :)

好运 :)

#1


2  

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,

传统上不支持Dropbox中的直接文件编辑,因此现有的Dropbox API不支持您所寻找的内容,可能是您目前所做的,

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.

是Dropbox云中修改文件的最佳(也是唯一)方式。

But apart from this it does support file revision mechanism, which can be achieved with help of /delta, /revision

但除此之外,它确实支持文件修订机制,可以在/ 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.

一种让您跟上用户Dropbox中文件和文件夹更改的方法。您可以定期调用/ delta来获取“delta条目”列表,这些条目是有关如何更新本地状态以匹配服务器状态的说明。

https://www.dropbox.com/developers-v1/core/docs#revisions

https://www.dropbox.com/developers-v1/core/docs#revisions

Best Luck :)

好运 :)