Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
bbongrip
9 years agoHelpful | Level 6
How do I upload a PDF file with Swiftly Dropbox
i can't seem to get a file upload properly with the new v2 Swiftly Dropbox. Can someone please give me and example? Im trying to upload a pdf file with images and markup text. thanks in advance. ...
Greg-DB
Dropbox Community Moderator
9 years agoThe type of file shouldn't really matter. This works for me:
let data = try? Data(contentsOf: URL(fileURLWithPath: "/local/path/to/test.pdf"))
if (data != nil) {
DropboxClientsManager.authorizedClient!.files.upload(path: "/test.pdf", input: data!)
.response { response, error in
if let response = response {
print(response)
} else if let error = error {
print(error)
}
}
}
If you're still having trouble, please share your code and the error you're getting.
bbongrip
9 years agoHelpful | Level 6
thanks Greg. this is similar to what i had but its still giving me an error about the directory path. ill post some of my code later on when i get a chance.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!