Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here! 

Forum Discussion

petal's avatar
petal
Explorer | Level 4
5 years ago
Solved

some questions abut dropbox

hi:

    I want to integrate dropbox to my little app using java. Here is some question I want to figure out

    1.  Dropbox updating file by incremental update or full update? I

    2. If one file is synchronized by multiple device, will the file be covered by each other? 

    3. If one file has been updated by one device, can another device be noticed by dropbox, or should this device query the update itself?

    4. Are all the apis provided by java SDK the rest api? Or how should I distinguish which is rest api?

Thanks a lot

 

  • Thanks for clarifying! If multiple devices to try write to the same location at the exact same time, they may hit "lock contention". You can find information on that in the Performance Guide.

     

    Otherwise, if multiple devices try to write to the same file, the behavior will depend on the write mode that the app specifies. For example, in the Java SDK, you can use UploadBuilder.withMode to specify the write mode. Check out the WriteMode documentation for information on the different options.

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    1. When using the Dropbox API, such as via the official Dropbox API v2 Java SDK, to upload a new version of a file, the app needs to upload the entire new version of the file. The API does not offer a way to upload only the changed portion of a file, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

     

    2. I'm not sure I understand exactly what you mean when you say "covered". When an API app on one device updates a file in a Dropbox account, the updated file is saved to the Dropbox servers. What other devices then do is up to the code running on those devices.

     

    3. The Dropbox API does offer some ways to detect or be notified of changes like this. I recommend referring to the Detecting Changes Guide for information.

     

    4. The official Dropbox API v2 Java SDK as well as the other official SDKs all use the same HTTPS interface for the Dropbox API. The SDK supports the same functionality available on the HTTPS API, though new features may lag a bit until the SDK is updated.

  • petal's avatar
    petal
    Explorer | Level 4
    5 years ago

    Thanks, your reply really helps

    Sorry there is one question I did not describe clearly. I want to ask, if one file in dropbox is being updated by multiple devices at the same time, how will dropbox handld this situation?What will the final document look like?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    Thanks for clarifying! If multiple devices to try write to the same location at the exact same time, they may hit "lock contention". You can find information on that in the Performance Guide.

     

    Otherwise, if multiple devices try to write to the same file, the behavior will depend on the write mode that the app specifies. For example, in the Java SDK, you can use UploadBuilder.withMode to specify the write mode. Check out the WriteMode documentation for information on the different options.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,017 PostsLatest Activity: 15 hours ago
401 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!