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.