<?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: Upload and download large files in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136231#M4196</link>
    <description>&lt;P&gt;In the latest version of .NET SDK, you can&amp;nbsp;create DropboxClient using custom http client in which you can specify a longer timeout. See&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/Examples/SimpleTest/Program.cs" rel="nofollow noreferrer"&gt;https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/Examples/SimpleTest/Program.cs&lt;/A&gt; as example.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Oct 2015 04:08:41 GMT</pubDate>
    <dc:creator>Qiming Y.</dc:creator>
    <dc:date>2015-10-01T04:08:41Z</dc:date>
    <item>
      <title>Upload and download large files</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136226#M4191</link>
      <description>&lt;P&gt;Hello dropboxers,&lt;/P&gt;
&lt;P&gt;I'm using Dropbox SDK for .NET v2 and I'm trying to download a file which has 60 MB&amp;nbsp;and I get an AggregateException : {"A task was canceled."}&amp;nbsp;:.I've tried also to download a folder which contains only documents (a few MB) and it works .&lt;/P&gt;
&lt;P&gt;The method&amp;nbsp;for download a file:&lt;/P&gt;
&lt;PRE&gt;private async Task GetFileTask(string cloudPath, string localPath)&lt;BR /&gt; {&lt;BR /&gt; if (string.IsNullOrEmpty(cloudPath) || string.IsNullOrEmpty(localPath))&lt;BR /&gt; return;&lt;/PRE&gt;
&lt;PRE&gt;try&lt;BR /&gt; {&lt;BR /&gt; var response = await dbxClient.Files.DownloadAsync(cloudPath);&lt;BR /&gt; System.IO.Stream responseAsstrin = await response.GetContentAsStreamAsync();&lt;BR /&gt; System.IO.FileStream fileStream = System.IO.File.Create(localPath, (int)responseAsstrin.Length);&lt;BR /&gt; // Initialize the bytes array with the stream length and then fill it with data&lt;BR /&gt; byte[] bytesInStream = new byte[responseAsstrin.Length];&lt;BR /&gt; responseAsstrin.Read(bytesInStream, 0, bytesInStream.Length);&lt;BR /&gt; // Use write method to write to the file specified above&lt;BR /&gt; fileStream.Write(bytesInStream, 0, bytesInStream.Length);&lt;BR /&gt; fileStream.Close();&lt;BR /&gt; }&lt;BR /&gt; catch (AggregateException ex)&lt;BR /&gt; {&lt;BR /&gt; string message = ex.Message;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Also for uploading large files.Same error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I missing something ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:39:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136226#M4191</guid>
      <dc:creator>Nenciu D.</dc:creator>
      <dc:date>2019-05-29T09:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload and download large files</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136227#M4192</link>
      <description>&lt;P&gt;Can you put a breakpoint in your catch block and inspect the exception? It should contain more useful information about the issue from the&amp;nbsp;Dropbox API.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 03:27:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136227#M4192</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-09-16T03:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Upload and download large files</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136228#M4193</link>
      <description>&lt;P&gt;The type of error is AggregateException.&lt;/P&gt;
&lt;P&gt;InnerException :&amp;nbsp;{"A task was canceled."}&lt;/P&gt;
&lt;P&gt;Message :&amp;nbsp;One or more errors occurred.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is happening at call :&lt;/P&gt;
&lt;P&gt;System.Threading.Tasks.Task taskDownloadFile = Task.Run(() =&amp;gt; GetFileTask(cloudPath, localPath));&lt;BR /&gt; taskDownloadFile.Wait();&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 15:50:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136228#M4193</guid>
      <dc:creator>Nenciu D.</dc:creator>
      <dc:date>2015-09-16T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Upload and download large files</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136229#M4194</link>
      <description>&lt;P&gt;I believe this is essentially the same issue as the thread here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropboxforum.com/hc/en-us/community/posts/205788125-CSharp-SDK-await-dbx-Files-UploadAsync-object-gets-disposed-before-upload" rel="nofollow noreferrer"&gt;https://www.dropboxforum.com/hc/en-us/community/posts/205788125-CSharp-SDK-await-dbx-Files-UploadAsync-object-gets-disposed-before-upload&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 04:40:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136229#M4194</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-09-17T04:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Upload and download large files</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136230#M4195</link>
      <description>&lt;P&gt;Thanks Gregory . That was the solution . But I'm having&amp;nbsp;issues when downloading a large file with DownloadAsync&lt;/P&gt;
&lt;P&gt;private async Task&amp;lt;Stream&amp;gt; DowloadFileTask(DropboxClient client, string cloudPath, string localPath)&lt;BR /&gt; {&lt;BR /&gt; IDownloadResponse&amp;lt;FileMetadata&amp;gt; downloadedFileResponse = null;&lt;BR /&gt; Stream downloadedFileStream = null;&lt;BR /&gt; try&lt;BR /&gt; {&lt;BR /&gt; downloadedFileResponse = await client.Files.DownloadAsync(cloudPath);&lt;BR /&gt; downloadedFileStream = await downloadedFileResponse.GetContentAsStreamAsync();&lt;BR /&gt; }&lt;BR /&gt; catch (ApiException&amp;lt;DownloadError&amp;gt;)&lt;BR /&gt; { }&lt;BR /&gt; return downloadedFileStream == null ? null : downloadedFileStream;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;I can't see any download method to download chunks of file until all are downloaded.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 14:55:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136230#M4195</guid>
      <dc:creator>Nenciu D.</dc:creator>
      <dc:date>2015-09-17T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Upload and download large files</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136231#M4196</link>
      <description>&lt;P&gt;In the latest version of .NET SDK, you can&amp;nbsp;create DropboxClient using custom http client in which you can specify a longer timeout. See&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/Examples/SimpleTest/Program.cs" rel="nofollow noreferrer"&gt;https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/Examples/SimpleTest/Program.cs&lt;/A&gt; as example.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 04:08:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-and-download-large-files/m-p/136231#M4196</guid>
      <dc:creator>Qiming Y.</dc:creator>
      <dc:date>2015-10-01T04:08:41Z</dc:date>
    </item>
  </channel>
</rss>

