<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686708#M3386</link>
    <description>&lt;P&gt;Hello.&amp;nbsp; I am using the .Net Dropbox.Api (6.37.0) with the following code sample:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;using Dropbox.Api;
using Dropbox.Api.Files;
using System.Text;

namespace Dropbox
{
   internal class Program
   {
      static void Main(string[] args)
      {
         DropboxClientConfig config = new DropboxClientConfig
         {
            MaxRetriesOnError = 0
         };
         DropboxClient dropboxClient = new DropboxClient(AccessToken.ValidToken, config);

         Stream stream = new MemoryStream(Encoding.UTF8.GetBytes($"this is a test"));
         UploadArg uploadArg = new UploadArg($"/foo{Guid.NewGuid()}.txt"); // upload new file to root
         var result = dropboxClient.Files.UploadAsync(uploadArg, stream).Result;

         stream = new MemoryStream(Encoding.UTF8.GetBytes($"this is an updated test"));
         result = dropboxClient.Files.UploadAsync(result.Id, mode: new WriteMode().AsOverwrite, body: stream).Result;
      }
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When running, the second UploadAsync throws an&amp;nbsp;path/conflict/file exception.&amp;nbsp; This also repros if I change the first parameter in the second UploadAsync to result.PathLower.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is this?&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 20:34:56 GMT</pubDate>
    <dc:creator>sbrownnw</dc:creator>
    <dc:date>2023-05-24T20:34:56Z</dc:date>
    <item>
      <title>Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686708#M3386</link>
      <description>&lt;P&gt;Hello.&amp;nbsp; I am using the .Net Dropbox.Api (6.37.0) with the following code sample:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;using Dropbox.Api;
using Dropbox.Api.Files;
using System.Text;

namespace Dropbox
{
   internal class Program
   {
      static void Main(string[] args)
      {
         DropboxClientConfig config = new DropboxClientConfig
         {
            MaxRetriesOnError = 0
         };
         DropboxClient dropboxClient = new DropboxClient(AccessToken.ValidToken, config);

         Stream stream = new MemoryStream(Encoding.UTF8.GetBytes($"this is a test"));
         UploadArg uploadArg = new UploadArg($"/foo{Guid.NewGuid()}.txt"); // upload new file to root
         var result = dropboxClient.Files.UploadAsync(uploadArg, stream).Result;

         stream = new MemoryStream(Encoding.UTF8.GetBytes($"this is an updated test"));
         result = dropboxClient.Files.UploadAsync(result.Id, mode: new WriteMode().AsOverwrite, body: stream).Result;
      }
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When running, the second UploadAsync throws an&amp;nbsp;path/conflict/file exception.&amp;nbsp; This also repros if I change the first parameter in the second UploadAsync to result.PathLower.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is this?&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 20:34:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686708#M3386</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-24T20:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686715#M3387</link>
      <description>&lt;P&gt;Please use Dropbox.Api.Files.WriteMode.Overwrite.Instance to set the overwrite mode (instead of AsOverwrite).&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:01:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686715#M3387</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-05-24T21:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686717#M3388</link>
      <description>&lt;P&gt;Ok.&amp;nbsp; Strange, but ok.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the similar code and it does not compile with:&amp;nbsp; &amp;nbsp; &amp;nbsp;mode: WriteMode.Update.Instance&lt;BR /&gt;And it throws the same exception with:&amp;nbsp; &amp;nbsp; &amp;nbsp;mode: new WriteMode().Update&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I use for Updating a file?&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:29:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686717#M3388</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-24T21:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686720#M3389</link>
      <description>&lt;P&gt;For the update write mode, you need to supply the rev value that you are intending to update, so you would make that like: new WriteMode.Update(result.Rev)&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:44:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686720#M3389</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-05-24T21:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686727#M3390</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 22:18:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686727#M3390</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-24T22:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686736#M3391</link>
      <description>&lt;P&gt;I still get a compilation error following your example (FileMetadata.Rev is a string):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sbrownnw_0-1684969863519.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/38025i662F84BCB7EF1251/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sbrownnw_0-1684969863519.png" alt="sbrownnw_0-1684969863519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 23:11:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686736#M3391</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-24T23:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686840#M3392</link>
      <description>&lt;P&gt;That error is occurring because you're missing the "new" necessary to create that instance. Please add the "new" back like in my message and try again.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 11:08:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Uploading-an-update-to-a-file-with-WriteMode-AsOverwrite-mode/m-p/686840#M3392</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-05-25T11:08:54Z</dc:date>
    </item>
  </channel>
</rss>

