We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
duynh7401
3 years agoExplorer | Level 4
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...
- 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.
duynh7401
Explorer | Level 4
Hi Здравко
I mean a have a folder Q4 (like structure in the picture), I want to download it as a zip, when I use the api to download, it caused the problem. As your information, I have add .zip after the folder name (as picture) but it's still not working.
Здравко
3 years agoLegendary | Level 20
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
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 3 hours agoIf 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!