<?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 Upload SQLite Not a Database in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319294#M18864</link>
    <description>&lt;P&gt;I have been able to get the Dropbox SDK working for objective C. The problem I am running into is that when I upload my backup of a SQLite database it is no longer being recognized as a DB. After some searching it seems that the issue may be that upon upload the DB may be in use. Any assistance on how to ensure it is not in use before uploading or kill any processes that may be using it? Additionally I noticed that the code for uploading uses "uploadData" whereas the code for downloading uses "downloadURL" - could that have anyhting to do with it?&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:08:40 GMT</pubDate>
    <dc:creator>datan3rd</dc:creator>
    <dc:date>2019-05-29T09:08:40Z</dc:date>
    <item>
      <title>Upload SQLite Not a Database</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319294#M18864</link>
      <description>&lt;P&gt;I have been able to get the Dropbox SDK working for objective C. The problem I am running into is that when I upload my backup of a SQLite database it is no longer being recognized as a DB. After some searching it seems that the issue may be that upon upload the DB may be in use. Any assistance on how to ensure it is not in use before uploading or kill any processes that may be using it? Additionally I noticed that the code for uploading uses "uploadData" whereas the code for downloading uses "downloadURL" - could that have anyhting to do with it?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:08:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319294#M18864</guid>
      <dc:creator>datan3rd</dc:creator>
      <dc:date>2019-05-29T09:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Upload SQLite Not a Database</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319298#M18865</link>
      <description>&lt;P&gt;UPDATE: good news is I was able to find some code that worked in uploading the file and the subsequent download and restore is now working.&lt;/P&gt;&lt;P&gt;New smaller issue:&lt;/P&gt;&lt;P&gt;I need to figure out the code to allow overwrite as if the backup already exists then it will fail on upload currently.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   [[client.filesRoutes uploadUrl:@"/backups/Backup.sqlite" inputUrl:databasePath]
     setResponseBlock:^(DBFILESFileMetadata *metadata, DBFILESUploadError *uploadError, DBRequestError *error) {
         if (metadata) {
             NSLog(@"The upload completed successfully.");
             NSLog(@"File metadata:");
             NSLog(@"%@", metadata);
             [self enableRestore];
         } else if (uploadError) {
             NSLog(@"Something went wrong with the upload:");
             NSLog(@"%@", uploadError);
         } else if (error) {
             NSLog(@"Something went wrong with the API call:");
             NSLog(@"%@", error);
         }
     }];&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Dec 2018 15:46:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319298#M18865</guid>
      <dc:creator>datan3rd</dc:creator>
      <dc:date>2018-12-21T15:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Upload SQLite Not a Database</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319317#M18866</link>
      <description>&lt;P&gt;I'm glad to hear you already sorted out the original issue.&lt;/P&gt;
&lt;P&gt;To control overwriting, you should use &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)uploadUrl:mode:autorename:clientModified:mute:propertyGroups:inputUrl:" target="_self"&gt;this version of the uploadUrl method&lt;/A&gt;, which takes a 'mode' parameter. The 'mode' parameter accepts a &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESWriteMode.html" target="_self"&gt;DBFILESWriteMode&lt;/A&gt;&amp;nbsp;object, which you can set to your desired write mode, such as "Overwrite". There's an example of that &lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c#upload-style-request" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 17:45:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319317#M18866</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-12-21T17:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Upload SQLite Not a Database</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319319#M18867</link>
      <description>&lt;P&gt;Greg - thanks as always for the reply. This code is where I started from. Using that code (uploadData) the SQLite file was not retaining itself as a DB. Switching to the code I have now with uploadUrl is functioning as expected with the exception of the overwrite issue. I will chose the overwrite issue and possibly just code around it if there is no alternative.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 17:49:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319319#M18867</guid>
      <dc:creator>datan3rd</dc:creator>
      <dc:date>2018-12-21T17:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Upload SQLite Not a Database</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319327#M18871</link>
      <description>&lt;P&gt;The example I linked to happens to use uploadData, but you can also pass a 'mode' to &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)uploadUrl:mode:autorename:clientModified:mute:propertyGroups:inputUrl:" target="_self"&gt;uploadUrl&lt;/A&gt;. Constructing and passing the mode works the same way for both.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 18:27:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-SQLite-Not-a-Database/m-p/319327#M18871</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-12-21T18:27:28Z</dc:date>
    </item>
  </channel>
</rss>

