Forum Discussion

bfmsoft's avatar
bfmsoft
New member | Level 2
9 years ago

If use files/append_v2 with close=true need finish?

There is a new API files/append_v2 with the close=true.  Do I need to call Finish if I specify close=true on the last append_v2 call?  That would save me one API call to the server.

 

Also, what does the close really do?  I can't find any documentation on what it means.

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

    The documentation for /2/files/upload_session/append_v2 describes the close parameter as:

     

    "close Boolean If true, the current session will be closed, at which point you won't be able to call upload_session/append_v2 anymore with the current session. The default for this field is False."

     

    That is, you can't add more data to an upload session once you "close" it. You should close it once you've finished uploading the data for that file.

     

    You do still need to call finish, even if you've already closed the upload session. When you call finish, you commit the upload, specifying the desired file path, write mode, etc.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,949 PostsLatest Activity: 38 minutes ago
352 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!