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

duynh7401's avatar
duynh7401
Explorer | Level 4
3 years ago

Problem with download a folder as a zip with API

I try to use this API a lot of time, but it always download a document file which I even could not open. It will be better more if you teach me how to implement this API by using Java JDK.  The upl...
  • Здравко's avatar
    Здравко
    3 years ago

    Hi duynh7401,

    😯 Seems I was not clear enough.


    Hi Здравко wrote:

    ... you should fill the path field in Dropbox API Explorer with "/folderName" (without quotes). ... Add ".zip" to the downloaded file name (i.e. "folderName.zip") to make sure your file explorer can "understand" the file correctly. ...



    duynh7401 wrote:

    Hi Здравко 

    ... As your information, I have add .zip after the folder name (as picture) but it's still not working.

    ...


    I haven't mentioned adding ".zip" in path field!!! Do you have a folder in your account with name "Q4.zip"?! 🧐... Of course, that's why result is "path/not found/". 😉 Path field is for the folder path, not to the downloaded file name! That's why your first call succeeds:


    duynh7401 wrote:

    ...

    ...


    After this call, result gets backup in your browser; you can push "Download Q4" to get it as a file. In this particular case your browser will propose file name "Q4"; here you can add ".zip" and rename it to "Q4.zip" - at this moment (or later), not in advance! The situation is similar when you use your SDK. The data stream is just a file content, again; this stream doesn't contain file name - managing correct name is your responsibility! Probably that's something you are missing. 😉

    Hope it's a bit more clear now.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 24 hours 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!