We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
dougnull
3 years agoExplorer | Level 4
how do I set my Swift Dropbox API .upload to overwrite
How do I make .upload overwrite the file if it's already in dropbox?
When my swift tries to upload an updated file, I get "API route" error if file already in dropbox.
I tried this:
let req...
- 3 years ago
[Cross-linking for reference: https://stackoverflow.com/questions/72060987/how-can-i-overwrite-a-file-using-dropbox-api-in-ios-swift#72060987 ]
The upload method takes a 'mode' parameter, for which the value should be a Files.WriteMode, like this:
client.files.upload(path: dropbox_upload_pathname, mode: Files.WriteMode.overwrite, input: fileData) .response { response, error in if let response = response { print(response) } else if let error = error { print(error) } }
For reference, you can use "overwrite", but "update" is recommended, as it's safer.
Greg-DB
3 years agoDropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/72060987/how-can-i-overwrite-a-file-using-dropbox-api-in-ios-swift#72060987 ]
The upload method takes a 'mode' parameter, for which the value should be a Files.WriteMode, like this:
client.files.upload(path: dropbox_upload_pathname, mode: Files.WriteMode.overwrite, input: fileData)
.response { response, error in
if let response = response {
print(response)
} else if let error = error {
print(error)
}
}
For reference, you can use "overwrite", but "update" is recommended, as it's safer.
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!