<?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: Download file to local dir in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274986#M16401</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/673686"&gt;@eduapp&lt;/a&gt;&amp;nbsp;Your question looks unrelated to this thread, so please start a new thread with the details of the issue you're seeing (e.g., steps and code to reproduce the issue, plus the error message for the crash) so we can take a look and help without&amp;nbsp;spamming anyone else here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014" target="_blank"&gt;https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 03 May 2018 19:29:48 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-05-03T19:29:48Z</dc:date>
    <item>
      <title>Download file to local dir</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274357#M16337</link>
      <description>&lt;P&gt;Hello! I try to Download to disc one file from cloud. I use Dropbox .Net SDK C#. Here my code :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;static async Task Download(string folder, string file)
        {
            var dbx = new DropboxClient("TOKEN");
            using (var response = await dbx.Files.DownloadAsync(folder + "/" + file))
            {
                if (response != null)
                    Console.WriteLine("Download start - {0}", response.Response.Name);
                else
                {
                    Console.WriteLine("file not found");
                }

                var files = await response.GetContentAsStreamAsync();
                using (FileStream fileStream = File.Create(response.Response.Name, (int)files.Length))
                {
                    byte[] data = new byte[files.Length];
                    files.Read(data, 0, (int)data.Length);
                    fileStream.Write(data, 0, data.Length);
                }
                Console.WriteLine("file was Downloaded");
            }
        }&lt;/PRE&gt;&lt;P&gt;I have `Download start&amp;nbsp;` but never get `file was Downloaded`, why ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:13:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274357#M16337</guid>
      <dc:creator>Ilya_C</dc:creator>
      <dc:date>2019-05-29T09:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Download file to local dir</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274669#M16382</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/670810"&gt;@Ilya_C&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think part of the problem is in this line:&lt;/P&gt;
&lt;PRE&gt;using (FileStream fileStream = File.Create(response.Response.Name, (int)files.Length))&lt;/PRE&gt;
&lt;P&gt;The stream returned is not seekable, and I think getting the Length requires a seek operation. Can you try removing that and seeing if things work as expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you might be able to eliminate some code by using CopyTo():&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;using (FileStream fileStream = File.Create(response.Response.Name))
{
    files.CopyTo(fileStream);
}&lt;/PRE&gt;
&lt;P&gt;Let me know if that helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 22:02:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274669#M16382</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-05-01T22:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Download file to local dir</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274980#M16399</link>
      <description>&lt;P&gt;Guys help, I did generate a link to my pdf file, and recently tried to access it from my Android App, using &lt;STRONG&gt;Asynch Task&lt;/STRONG&gt;, but it returns nothing and crashes my App so bad. It seems like my App cannot catch the file dropped in my dropbox folder. Note. I can easily&lt;STRONG&gt; download all pdf files&lt;/STRONG&gt; from any online source without having an issue. It sucks....please help me.&lt;STRONG&gt;.how am i supposed to it?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 18:56:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274980#M16399</guid>
      <dc:creator>eduapp</dc:creator>
      <dc:date>2018-05-03T18:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Download file to local dir</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274986#M16401</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/673686"&gt;@eduapp&lt;/a&gt;&amp;nbsp;Your question looks unrelated to this thread, so please start a new thread with the details of the issue you're seeing (e.g., steps and code to reproduce the issue, plus the error message for the crash) so we can take a look and help without&amp;nbsp;spamming anyone else here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014" target="_blank"&gt;https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 19:29:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-file-to-local-dir/m-p/274986#M16401</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-05-03T19:29:48Z</dc:date>
    </item>
  </channel>
</rss>

