We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

dougnull's avatar
dougnull
Explorer | Level 4
3 years ago

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 request = client!.files.upload( path: dropbox_upload_pathname, input: fileData, WriteMode: overwrite )

..but got error "Cannot find 'overwrite' in scope."

I tried these but get build errors...

client!.files.upload( path: dropbox_upload_pathname, WriteMode: overwrite, input: fileData)

client!.files.upload( path: dropbox_upload_pathname, input: fileData, WriteMode: overwrite)