Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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.
The 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.
Hi there!
If you need more help you can view your support options (expected response time for a 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!