<?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: ECONNRESET while downloading shared file as a stream in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/749818#M32916</link>
    <description>&lt;P&gt;Thanks for the report! It looks like the /2/sharing/get_shared_link_file endpoint is configured with a 10 minute timeout. I'll ask the team to look into whether we can increase that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a workaround, whether you're using this /2/sharing/get_shared_link_file endpoint or are downloading from the shared link directly, you can use &lt;A href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range-requests" target="_blank"&gt;"Range" requests&lt;/A&gt; to download a portion of the file at a time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you need to perform these downloads over periods of time longer than the relevant timeout, please use multiple requests lasting no longer than the timeout, to download a piece of the file per request, and then re-assemble the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, here's a sample of what it would look like in curl:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -v -X POST https://content.dropboxapi.com/2/sharing/get_shared_link_file \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --header 'Dropbox-API-Arg: {"url":"SHARED_LINK"}' \
  --header 'Range: bytes=0-10'&lt;/LI-CODE&gt;
&lt;P&gt;That would download just the first 11 bytes of the file at the shared link. You can modify the byte range to download any piece of a file, such as to continue downloading the next portion of a file.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 20:38:55 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2024-02-07T20:38:55Z</dc:date>
    <item>
      <title>ECONNRESET while downloading shared file as a stream</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/749662#M32907</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, when I try to download a shared file using API , the socket closes at the 10th minute, and I receive an 'ECONNRESET' error. Without using the API, I was able to download for an hour. And after an hours it's closing the connection again. By the way, the file I'm downloading is over 100GB. Can you help me with this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;await this&lt;/SPAN&gt;.httpService.&lt;SPAN&gt;axiosRef(&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;  url&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'https://content.dropboxapi.com/2/sharing/get_shared_link_file'&lt;/SPAN&gt;,&lt;BR /&gt;  method&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'POST'&lt;/SPAN&gt;,&lt;BR /&gt;  headers&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    Authorization&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;`Bearer &lt;/SPAN&gt;$&lt;SPAN&gt;{&lt;/SPAN&gt;DROPBOX_API_TOKEN&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;'Dropbox-API-Arg'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;JSON.&lt;SPAN&gt;stringify&lt;/SPAN&gt;&lt;SPAN&gt;({ &lt;/SPAN&gt;url&lt;SPAN&gt;: &lt;/SPAN&gt;videoUrl &lt;SPAN&gt;})&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'application/octet-stream'&lt;/SPAN&gt;,&lt;BR /&gt;  &lt;SPAN&gt;}&lt;/SPAN&gt;,&lt;BR /&gt;  responseType&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'stream'&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Feb 2024 09:38:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/749662#M32907</guid>
      <dc:creator>bambaba12</dc:creator>
      <dc:date>2024-02-07T09:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: ECONNRESET while downloading shared file as a stream</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/749818#M32916</link>
      <description>&lt;P&gt;Thanks for the report! It looks like the /2/sharing/get_shared_link_file endpoint is configured with a 10 minute timeout. I'll ask the team to look into whether we can increase that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a workaround, whether you're using this /2/sharing/get_shared_link_file endpoint or are downloading from the shared link directly, you can use &lt;A href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range-requests" target="_blank"&gt;"Range" requests&lt;/A&gt; to download a portion of the file at a time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you need to perform these downloads over periods of time longer than the relevant timeout, please use multiple requests lasting no longer than the timeout, to download a piece of the file per request, and then re-assemble the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, here's a sample of what it would look like in curl:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -v -X POST https://content.dropboxapi.com/2/sharing/get_shared_link_file \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --header 'Dropbox-API-Arg: {"url":"SHARED_LINK"}' \
  --header 'Range: bytes=0-10'&lt;/LI-CODE&gt;
&lt;P&gt;That would download just the first 11 bytes of the file at the shared link. You can modify the byte range to download any piece of a file, such as to continue downloading the next portion of a file.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 20:38:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/749818#M32916</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-02-07T20:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: ECONNRESET while downloading shared file as a stream</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/750691#M32929</link>
      <description>&lt;P&gt;We've increased the /2/sharing/get_shared_link_file endpoint timeout. For downloads that will take a long time, please use Range requests to retrieve the entire file across multiple requests as described in my previous message.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:26:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/750691#M32929</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-02-12T20:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: ECONNRESET while downloading shared file as a stream</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/750693#M32930</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you. Yes, as you suggested, I started using range, and this has been more effective&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:38:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ECONNRESET-while-downloading-shared-file-as-a-stream/m-p/750693#M32930</guid>
      <dc:creator>bambaba12</dc:creator>
      <dc:date>2024-02-12T20:38:01Z</dc:date>
    </item>
  </channel>
</rss>

