<?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: Using Dropbox offline with HTML/JS webmapping app (iPad) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/294171#M17915</link>
    <description>&lt;P&gt;Many thanks Greg,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been looking at (potential) solutions to this issue for a month or more - so many dead ends and red herrings - many to do with iOS/iPad (solution works fine on Windows).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe I have tried every JS library out there (often more than once), but am still unable to get my web portal to save a text file (GeoJSON) on the iPad - apart from displaying the text in a browser window, which the client doesn't want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought dropbox might prove to be my salvation - especially with the automatic sync to base - but it appears not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be good to see this capability in future releases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Mark&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 23:24:30 GMT</pubDate>
    <dc:creator>utumno</dc:creator>
    <dc:date>2018-08-27T23:24:30Z</dc:date>
    <item>
      <title>Using Dropbox offline with HTML/JS webmapping app (iPad)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/293737#M17887</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an HTML/JS webmapping application which needs to work offline on iPad (and sync back to base when online).&amp;nbsp; Dropbox seemed to provide the only workable solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Users should be able to add point features to the webmap and save them to a text file (geojson) in the offline dropbox folder on iPad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a dropbox app and set the file to be available offline, but am unable to write/overwrite it offline - online I can make a change in any of iPad/PC/Laptop and almost immediately see the updates to the file (valid geojson).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the following code to write the file and, I guess, the offline issue is with the xhr requests and offline use, but I don't know what else to use - any advice would be appreciated. Cheers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// ** in function called by button click in web map&lt;/P&gt;&lt;P&gt;var data = pt.toGeoJSON();&lt;BR /&gt;var convertedData = JSON.stringify(data);&lt;BR /&gt;var xhr = new XMLHttpRequest();&lt;BR /&gt;&lt;BR /&gt;xhr.upload.onprogress = function(evt) {&lt;BR /&gt;var percentComplete = parseInt(100.0 * evt.loaded / evt.total);&lt;BR /&gt;// Upload in progress. Do something here with the percent complete.&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;xhr.onload = function() {&lt;BR /&gt;if (xhr.status === 200) {&lt;BR /&gt;var fileInfo = JSON.parse(xhr.response);&lt;BR /&gt;// Upload succeeded. Do something here with the file info.&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;var errorMessage = xhr.response || 'Unable to upload file';&lt;BR /&gt;// Upload failed. Do something here with the error.&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;xhr.open('POST', '&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt;');&lt;BR /&gt;xhr.setRequestHeader('Authorization', 'Bearer&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;xyz');&lt;BR /&gt;xhr.setRequestHeader('Content-Type', 'application/octet-stream');&lt;BR /&gt;xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({&lt;BR /&gt;path: '/DBXTest.txt',&lt;BR /&gt;mode: 'overwrite',&lt;BR /&gt;//mode: 'add',&lt;BR /&gt;autorename: true,&lt;BR /&gt;mute: false&lt;BR /&gt;}));&lt;BR /&gt;&lt;BR /&gt;xhr.send(convertedData);&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:10:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/293737#M17887</guid>
      <dc:creator>utumno</dc:creator>
      <dc:date>2019-05-29T09:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Dropbox offline with HTML/JS webmapping app (iPad)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/294039#M17900</link>
      <description>&lt;P&gt;The&amp;nbsp;Dropbox API and JavaScript SDK do not offer native offline functionality unfortunately,&amp;nbsp;but I'll pass this along as a feature request.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to make a&amp;nbsp;Dropbox API call, such as to upload files using /2/files/upload as you have in your code, the client does need an active Internet connection. We have &lt;A href="https://github.com/dropbox/dropbox-sdk-js" target="_blank"&gt;an official JavaScript SDK&lt;/A&gt; you can use, but it doesn't offer the ability to automatically queue up API calls offline. If you need offline support, you'll need to implement that in your own code. Apologies I don't have better news for you!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 14:05:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/294039#M17900</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-08-27T14:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using Dropbox offline with HTML/JS webmapping app (iPad)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/294171#M17915</link>
      <description>&lt;P&gt;Many thanks Greg,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been looking at (potential) solutions to this issue for a month or more - so many dead ends and red herrings - many to do with iOS/iPad (solution works fine on Windows).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe I have tried every JS library out there (often more than once), but am still unable to get my web portal to save a text file (GeoJSON) on the iPad - apart from displaying the text in a browser window, which the client doesn't want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought dropbox might prove to be my salvation - especially with the automatic sync to base - but it appears not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be good to see this capability in future releases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Mark&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 23:24:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-Dropbox-offline-with-HTML-JS-webmapping-app-iPad/m-p/294171#M17915</guid>
      <dc:creator>utumno</dc:creator>
      <dc:date>2018-08-27T23:24:30Z</dc:date>
    </item>
  </channel>
</rss>

