We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Peter G.7
9 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.
- Peter G.7New 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.New member | Level 1
I'm also having this issue.
- Greg-DBDropbox Staff
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.
5,877 PostsLatest Activity: 12 months 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!