cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

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: 

Re: Autorename for existing files on upload does not rename .NET

Autorename for existing files on upload does not rename .NET

kokoko
New member | Level 2
Go to solution

Here is the piece of code which is supposed to rename an existing file and upload it to Dropbox. It simply does nothing. What am I missing here?

 

using (var memFile = new FileStream(srcFile, FileMode.Open, FileAccess.Read))
{
var uploadFile= await dbx.Files.UploadAsync("/myfolder/" + fileName, WriteMode.Add.Instance, body: memFile, autorename: true);
}


Any help would be appreciated.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
Are you uploading the same data again? If the data is exactly the same as what already exists at the destination path, no conflict will occur and it won't create a renamed copy.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution
Are you uploading the same data again? If the data is exactly the same as what already exists at the destination path, no conflict will occur and it won't create a renamed copy.

kokoko
New member | Level 2
Go to solution
I thought only the file name is important. I just changed the file content and it renamed the file as expected. Thanks for that.
Need more support?