<?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 Getting OutOfMemoryException when downloading in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165363#M5910</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I wrote a quick console app using Dropbox.NET with the intent of downloading particular files or folders from Dropbox (for archival purposes, etc...there are multiple reasons).&lt;/P&gt;
&lt;P&gt;However, I quickly ran into an issue when it tried to download a 1GB file. I receive an OutOfMemoryException. Here is the code that I use:&lt;/P&gt;
&lt;P&gt;---------------&lt;/P&gt;
&lt;P&gt;private async Task DownloadFile(string dropboxPath, string targetPath) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var response = await _dbx.Files.DownloadAsync(dropboxPath)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var source = await response.GetContentAsStreamAsync()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var target = File.Create(targetPath)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; await source.CopyToAsync(target);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;---------------&lt;/P&gt;
&lt;P&gt;This code does work for smaller files, and I know my system itself is not out of memory (have over 8 GB still available). Am I doing something wrong?&lt;/P&gt;
&lt;P&gt;Please advise...thanks!&lt;/P&gt;
&lt;P&gt;Ryan&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:36:38 GMT</pubDate>
    <dc:creator>Ryan F.17</dc:creator>
    <dc:date>2019-05-29T09:36:38Z</dc:date>
    <item>
      <title>Getting OutOfMemoryException when downloading</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165363#M5910</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I wrote a quick console app using Dropbox.NET with the intent of downloading particular files or folders from Dropbox (for archival purposes, etc...there are multiple reasons).&lt;/P&gt;
&lt;P&gt;However, I quickly ran into an issue when it tried to download a 1GB file. I receive an OutOfMemoryException. Here is the code that I use:&lt;/P&gt;
&lt;P&gt;---------------&lt;/P&gt;
&lt;P&gt;private async Task DownloadFile(string dropboxPath, string targetPath) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var response = await _dbx.Files.DownloadAsync(dropboxPath)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var source = await response.GetContentAsStreamAsync()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var target = File.Create(targetPath)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; await source.CopyToAsync(target);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;---------------&lt;/P&gt;
&lt;P&gt;This code does work for smaller files, and I know my system itself is not out of memory (have over 8 GB still available). Am I doing something wrong?&lt;/P&gt;
&lt;P&gt;Please advise...thanks!&lt;/P&gt;
&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:36:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165363#M5910</guid>
      <dc:creator>Ryan F.17</dc:creator>
      <dc:date>2019-05-29T09:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting OutOfMemoryException when downloading</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165364#M5911</link>
      <description>&lt;P&gt;Thanks for the report Ryan! This looks like a bug in the SDK. We're looking into it.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 07:54:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165364#M5911</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-21T07:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting OutOfMemoryException when downloading</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165365#M5912</link>
      <description>&lt;P&gt;This should be &lt;A href="https://www.nuget.org/packages/Dropbox.Api/" target="_blank" rel="nofollow noreferrer"&gt;fixed in version 2.2.3&lt;/A&gt;. Please update and let me know if you're still seeing any issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 08:14:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165365#M5912</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-21T08:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting OutOfMemoryException when downloading</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165366#M5913</link>
      <description>&lt;P&gt;The fix did indeed take care of the problem. Thanks so much for such a speedy resolution!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 12:17:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-OutOfMemoryException-when-downloading/m-p/165366#M5913</guid>
      <dc:creator>Ryan F.17</dc:creator>
      <dc:date>2016-01-21T12:17:42Z</dc:date>
    </item>
  </channel>
</rss>

