<?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 is there a way we can resume downloads from where it left ? in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393877#M979</link>
    <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote code using dropbox java sdk to download all the files in dropbox to my NAS (Network-attached storage). The data is huge . I tried to make the process faster using thread pool executor. However, when I abruptly close the program or when a fatal error occurus it corrupts the files that were in progress. Is there a way that we can delete the files that were not fully copied at the time of the fatal error?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is the draft code .. a lot of improvements can be made to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sukanth/Dropbox" target="_blank" rel="noopener"&gt;https://github.com/sukanth/Dropbox&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 13:55:00 GMT</pubDate>
    <dc:creator>Sukanth</dc:creator>
    <dc:date>2020-01-31T13:55:00Z</dc:date>
    <item>
      <title>is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393877#M979</link>
      <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote code using dropbox java sdk to download all the files in dropbox to my NAS (Network-attached storage). The data is huge . I tried to make the process faster using thread pool executor. However, when I abruptly close the program or when a fatal error occurus it corrupts the files that were in progress. Is there a way that we can delete the files that were not fully copied at the time of the fatal error?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is the draft code .. a lot of improvements can be made to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sukanth/Dropbox" target="_blank" rel="noopener"&gt;https://github.com/sukanth/Dropbox&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 13:55:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393877#M979</guid>
      <dc:creator>Sukanth</dc:creator>
      <dc:date>2020-01-31T13:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393919#M980</link>
      <description>&lt;P&gt;like the file is not fully downloaded. The output stream is interrupted in the middle and the whole image data is not written into the file because of the interruption. Is there a way that we can keep track of the files that were not fully downloaded and retry them again?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 16:27:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393919#M980</guid>
      <dc:creator>Sukanth</dc:creator>
      <dc:date>2020-01-31T16:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393973#M982</link>
      <description>&lt;P&gt;For cleaning up after failed operations, if an API call fails when you're using the Java SDK, it should raise an exception you can catch so you can perform whatever cleanup you need, such as deleting local files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For restarting downloads, you can actually use&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/DbxDownloadStyleBuilder.html#range-long-" target="_self"&gt;DbxDownloadStyleBuilder.range&lt;/A&gt; to restart a download at whatever point in the file you need. There's &lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/887fbf84f30445a10b9df7bca6f11321bbe7138c/src/test/java/com/dropbox/core/v2/DbxClientV2IT.java#L271" target="_self"&gt;an example of using that in test test code here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 19:34:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/393973#M982</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-01-31T19:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394014#M983</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Partially downloaded file" style="width: 200px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/13642iCB6B50D78E128FA7/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screenshot at Jan 31 18-57-37.png" alt="Partially downloaded file" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Partially downloaded file&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;when I say partially downloaded. I mean like the one in the above picture .when I stop the program abruptly this happens because the output stream is interrupted before the file is fully written on disk.&amp;nbsp; Can you suggest anything to handle this case?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 01:02:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394014#M983</guid>
      <dc:creator>Sukanth</dc:creator>
      <dc:date>2020-02-01T01:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394325#M984</link>
      <description>&lt;P&gt;Yes, it looks like in that case you've only written a portion of the file, so you could check how much of the file you did write, and then use&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/DbxDownloadStyleBuilder.html#range-long-" target="_self" rel="nofollow noopener noreferrer"&gt;DbxDownloadStyleBuilder.range&lt;/A&gt;&amp;nbsp;to download just the rest of the file.&lt;/P&gt;
&lt;P&gt;Also, if it's helpful, you can use &lt;A href="https://www.dropbox.com/developers/reference/content-hash" target="_self"&gt;the "Content Hash" feature&lt;/A&gt;, available in the Java SDK as&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/FileMetadata.html#contentHash" target="_self"&gt;FileMetadata.contentHash&lt;/A&gt;, to verify if you've successfully downloaded the full and correct file contents.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 15:13:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394325#M984</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-02-03T15:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394327#M985</link>
      <description>&lt;P&gt;Thank you, Greg !!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 15:14:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394327#M985</guid>
      <dc:creator>Sukanth</dc:creator>
      <dc:date>2020-02-03T15:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394350#M986</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I would ask you, why the range you mention isn't documented in HTTP documentation: &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/documentation#files-download&lt;/A&gt; ? Could this lack of completeness be corrected?&lt;/P&gt;&lt;P&gt;ADD: For upload also.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 15:48:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394350#M986</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2020-02-03T15:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way we can resume downloads from where it left ?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394351#M987</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;The&amp;nbsp;Dropbox API actually supports range requests for all content-download style endpoints in general, so it's mentioned in &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#formats" target="_self"&gt;the "Content-download endpoints" documentation&lt;/A&gt;. That could definitely be expanded on though, so I'll ask the team to improve that. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 15:51:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/is-there-a-way-we-can-resume-downloads-from-where-it-left/m-p/394351#M987</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-02-03T15:51:09Z</dc:date>
    </item>
  </channel>
</rss>

