<?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 Re: how do I set my Swift Dropbox API  .upload to overwrite in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/how-do-I-set-my-Swift-Dropbox-API-upload-to-overwrite/m-p/594197#M27643</link>
    <description>&lt;P&gt;[Cross-linking for reference: &lt;A href="https://stackoverflow.com/questions/72060987/how-can-i-overwrite-a-file-using-dropbox-api-in-ios-swift#72060987" target="_blank"&gt;https://stackoverflow.com/questions/72060987/how-can-i-overwrite-a-file-using-dropbox-api-in-ios-swift#72060987&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox11FilesRoutesC6upload4path4mode10autorename14clientModified4mute14propertyGroups14strictConflict5inputAA13UploadRequestCyAA0C0C22FileMetadataSerializerCAP0q5ErrorU0CGSS_AP9WriteModeOSb10Foundation4DateVSgSbSayAA0S10PropertiesC13PropertyGroupCGSgSbAX4DataVtF" target="_self"&gt;The upload method&lt;/A&gt; takes a 'mode' parameter, for which the value should be a &lt;A href="http://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/Files/WriteMode.html" target="_blank"&gt;Files.WriteMode&lt;/A&gt;, like this:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;client.files.upload(path: dropbox_upload_pathname, mode: Files.WriteMode.overwrite, input: fileData)
    .response { response, error in
        if let response = response {
            print(response)
        } else if let error = error {
            print(error)
        }
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference, you can use "overwrite", but "update" is recommended, as it's safer.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Apr 2022 18:48:47 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2022-04-29T18:48:47Z</dc:date>
    <item>
      <title>how do I set my Swift Dropbox API  .upload to overwrite</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/how-do-I-set-my-Swift-Dropbox-API-upload-to-overwrite/m-p/594178#M27637</link>
      <description>&lt;P&gt;How do I make .upload overwrite the file if it's already in dropbox?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When my swift tries to upload an updated file, I get "API route" error if file already in dropbox.&lt;/P&gt;
&lt;P&gt;I tried this:&lt;/P&gt;
&lt;P&gt;let request = client!.files.upload( path: dropbox_upload_pathname, input: fileData, WriteMode: overwrite )&lt;/P&gt;
&lt;P&gt;..but got error "Cannot find 'overwrite' in scope."&lt;/P&gt;
&lt;P&gt;I tried these but get build errors...&lt;/P&gt;
&lt;P&gt;client!.files.upload( path: dropbox_upload_pathname, WriteMode: overwrite, input: fileData)&lt;/P&gt;
&lt;P&gt;client!.files.upload( path: dropbox_upload_pathname, input: fileData, WriteMode: overwrite)&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 19:38:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/how-do-I-set-my-Swift-Dropbox-API-upload-to-overwrite/m-p/594178#M27637</guid>
      <dc:creator>dougnull</dc:creator>
      <dc:date>2022-05-02T19:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: how do I set my Swift Dropbox API  .upload to overwrite</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/how-do-I-set-my-Swift-Dropbox-API-upload-to-overwrite/m-p/594197#M27643</link>
      <description>&lt;P&gt;[Cross-linking for reference: &lt;A href="https://stackoverflow.com/questions/72060987/how-can-i-overwrite-a-file-using-dropbox-api-in-ios-swift#72060987" target="_blank"&gt;https://stackoverflow.com/questions/72060987/how-can-i-overwrite-a-file-using-dropbox-api-in-ios-swift#72060987&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox11FilesRoutesC6upload4path4mode10autorename14clientModified4mute14propertyGroups14strictConflict5inputAA13UploadRequestCyAA0C0C22FileMetadataSerializerCAP0q5ErrorU0CGSS_AP9WriteModeOSb10Foundation4DateVSgSbSayAA0S10PropertiesC13PropertyGroupCGSgSbAX4DataVtF" target="_self"&gt;The upload method&lt;/A&gt; takes a 'mode' parameter, for which the value should be a &lt;A href="http://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/Files/WriteMode.html" target="_blank"&gt;Files.WriteMode&lt;/A&gt;, like this:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;client.files.upload(path: dropbox_upload_pathname, mode: Files.WriteMode.overwrite, input: fileData)
    .response { response, error in
        if let response = response {
            print(response)
        } else if let error = error {
            print(error)
        }
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference, you can use "overwrite", but "update" is recommended, as it's safer.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 18:48:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/how-do-I-set-my-Swift-Dropbox-API-upload-to-overwrite/m-p/594197#M27643</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-04-29T18:48:47Z</dc:date>
    </item>
  </channel>
</rss>

