Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Peter G.7
10 years agoNew member | Level 2
[request-id 953b09474eb624414a4a43c7eeabc88c] API route error - { ".tag" = path; path = { ".tag" = "not_file"; };
I am trying to download a file using SwiftyDropbox. I can connect to Dropbox ok and I can access my Dropbox files, but I cannot download files. My code:
let client = Dropbox.authorizedClient
let destination : (NSURL, NSHTTPURLResponse) -> NSURL = { temporaryURL, response in
let fileManager = NSFileManager.defaultManager()
let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0]
let UUID = NSUUID().UUIDString
let pathComponent = "\(UUID)-\(response.suggestedFilename!)"
return directoryURL.URLByAppendingPathComponent(pathComponent)
}
let fromPath = "/Panther4/\(filenameX)"
let toPath = destination
client!.files.download(path: fromPath, destination: toPath).response { response, error in
if let (metadata, data) = response {
print("Dowloaded file name: \(metadata.name)")
print("Downloaded file data: \(data)")
} else {
print(error!)
}
}
and the error I get is:
[request-id 953b09474eb624414a4a43c7eeabc88c] API route error - {
".tag" = path;
path = {
".tag" = "not_file";
};
}
Any help would be appreciated.
3 Replies
Replies have been turned off for this discussion
- Peter G.710 years agoNew member | Level 2
A follow up.......I am able to upload and download individual files, but I need to be able to upload and download folders. I have tried numerous path configurations, to no avail. I am sure the answer is right in front of my face.....
- Pouria A.10 years agoNew member | Level 1
I'm also having this issue.
- Greg-DB10 years ago
Dropbox Community Moderator
Peter, the Dropbox API doesn't offer a way to download entire folders at once like this, but I'll be sure to pass this along as a feature request. That being the case, you'll need to loop through the files you need and download each of them.
Pouria, if the above resolve the issue you're having, please open a new thread with the details of the problem you're seeing.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!