You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

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

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.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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

      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 Staff rankDropbox Staff

        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.

5,910 PostsLatest Activity: 3 days ago
333 Following

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!