Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

dennis s.23's avatar
dennis s.23
New member | Level 1
9 years ago

UploadAsync will not overwrite

using Dropbox.NET. Calling UploadAsync with a commitInfo, and FileStream.

commitInfo = new CommitInfo(path, writeMode.AsOverwrite, false, null, false);

UploadAsync(commitInfo, aFileStream);

The first upload of the file works fine.  I then edit the file, by changing a line in it, and attempt another upload. It fails with:

Dropbox.Api.ApiException`1[Dropbox.Api.Files.UploadError]: path/conflict/file/

 

2 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    I think the issue is with your writeMode.AsOverwrite. You can instead do this:

    commitInfo = new Dropbox.Api.Files.CommitInfo(path, Dropbox.Api.Files.WriteMode.Overwrite.Instance, false, null, false);

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!