cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

uploadasync is always overwriting

New member | Level 1
New member | Level 1

 

Here is my code:

var updated = await dbx.Files.UploadAsync("/Apps/design-orders" + "/" + file.FileName, WriteMode.Add.Instance, true, body: mem);

 

I have tried different combinations of the mode and autorename parameters but it always overwrites the existing file. I would like it to rename if the file name already exists.

2 Replies 2
Highlighted

Re: uploadasync is always overwriting

Dropboxer
Dropboxer

This method and write mode seems to be working properly for me, so a few questions to help figure this out:

- What version of the SDK are you using?

- Are you getting any error or output?

- Can you print out the result you're getting in "updated" (e.g., updated.PathLower)?

- Are you uploading the same content? If you upload the same file content, it won't be considered a conflict, and so won't add a new file.

- Does your app have the app folder permission? If so, you shouldn't be specifying "/Apps/{app folder name}" yourself. You should just specify "/", which will implicitly be your app folder root.

Highlighted

Re: uploadasync is always overwriting

New member | Level 1
New member | Level 1

Gregory,

My files had the same name but they also had the same content. I tested files with the same name but different content and it worked. Thank you!

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?