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
shivam19
5 years agoExplorer | Level 3
empty response from copy api
https://api.dropboxapi.com/2/files/copy_v2
Two cases
1) id of files in both the input "from_path" and "to_path",
2) id of folder in "from_path" id of a file in "to_path".
it gives EMPTY re...
- 5 years ago
Thanks for the additional details! I'm able to reproduce this now.
It looks like this can happen when you specify a "to_path" value of a ID for a file with an extra path component appended on ("/new" in your case). Since the file ID is already for a file, you can't add an extra path component. (Files can only be nested inside folders, not files.) I'll ask the team to return a better error in this case.
Instead, you should supply the path where you want to put the file copy (like "/folder/newfile.ext"), or a file ID (like "id:FHpvNWBYUsAAAAAAAAAAdQ"), or the ID for a folder with a sub-path appended (like "id:ABC1234"/newfile.ext" where "id:ABC1234" is the ID for a folder).
Greg-DB
Dropbox Staff
Thanks for the additional details! I'm able to reproduce this now.
It looks like this can happen when you specify a "to_path" value of a ID for a file with an extra path component appended on ("/new" in your case). Since the file ID is already for a file, you can't add an extra path component. (Files can only be nested inside folders, not files.) I'll ask the team to return a better error in this case.
Instead, you should supply the path where you want to put the file copy (like "/folder/newfile.ext"), or a file ID (like "id:FHpvNWBYUsAAAAAAAAAAdQ"), or the ID for a folder with a sub-path appended (like "id:ABC1234"/newfile.ext" where "id:ABC1234" is the ID for a folder).
shivam19
5 years agoExplorer | Level 3
Hello Greg,
Thank you for the explanation.
We are writing web-services, error handling part. I encountered one more scenario :
If we provide a wrong folder id(which doesn't exist) in "from_path", it gives the proper error message as :
{
"error_summary": "from_lookup/not_found/...",
"error": {
".tag": "from_lookup",
"from_lookup": {
".tag": "not_found"
}
}
}
But when we give a wrong folder id in "to_path", then it gives an empty response body with 500 internal server error.
- Greg-DB5 years agoDropbox Staff
Thanks for the report! I'll ask the team to fix the error reporting in that case too.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 24 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!