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

Autorename for existing files on upload does not rename .NET

New member | Level 2
New member | Level 2

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
Highlighted

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

Dropboxer
Dropboxer
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
Highlighted

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

Dropboxer
Dropboxer
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

Highlighted

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

New member | Level 2
New member | Level 2
I thought only the file name is important. I just changed the file content and it renamed the file as expected. Thanks for that.
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?