<?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: Downloading a file from using the Python Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/261740#M16827</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;metadata, f = dropbox.file_download_details('/test.pdf')&lt;BR /&gt;out = open('test.pdf', 'wb')&lt;BR /&gt;out.write(f.content)&lt;BR /&gt;out.close()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am getting the following error in terminal&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;metadata, f = dropbox.file_download_details('/test.pdf')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;AttributeError: 'module' object has no attribute 'file_download_details'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2018 11:04:16 GMT</pubDate>
    <dc:creator>hilaal_leo</dc:creator>
    <dc:date>2018-01-22T11:04:16Z</dc:date>
    <item>
      <title>Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/230194#M16825</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the basic question. I'm updating the code I had for the V1 Python API and I'm having a trouble with the download function. Originally I used the following:&lt;/P&gt;
&lt;PRE&gt;f, metadata = client.get_file_and_metadata('/' + j)
out = open(j)
out.write(f.read())
out.close()&lt;/PRE&gt;
&lt;P&gt;Where 'j' is just a name of a picture from a list of names; this was what was used in the tutorial for the previous answer. Now, it seems that in the newest version of the API that function is gone and there seem to be two replacements: 'files_download()' and 'files_download_to_file()'. I'm confused because both essentially produce the same type of response:&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="docutils field-list" frame="void" rules="none"&gt;
&lt;TBODY valign="top"&gt;
&lt;TR class="field-even field"&gt;
&lt;TD class="field-body"&gt;
&lt;P class="first"&gt;(&lt;A class="reference internal" title="dropbox.files.FileMetadata" href="http://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.files.FileMetadata" target="_blank"&gt;&lt;CODE class="xref py py-class docutils literal"&gt;&lt;SPAN class="pre"&gt;dropbox.files.FileMetadata&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="xref py py-class docutils literal"&gt;&lt;SPAN class="pre"&gt;requests.models.Response&lt;/SPAN&gt;&lt;/CODE&gt;)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;What would be the correct way to transform the previous methodology to the new one?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:21:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/230194#M16825</guid>
      <dc:creator>fapb88ve</dc:creator>
      <dc:date>2019-05-29T09:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/230459#M16826</link>
      <description>&lt;P&gt;The &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_download" target="_self"&gt;files_download method&lt;/A&gt; is the closest to what you were using. The &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_download_to_file" target="_self"&gt;files_download_to_file method&lt;/A&gt;&amp;nbsp;takes an extra parameter for saving the file locally for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So either of these should be equivalent to your old code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;metadata, f = dbx.files_download('/'+ j)
out = open(j, 'wb')
out.write(f.content)
out.close()&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or just&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dbx.files_download_to_file(j, '/'+ j)&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jul 2017 17:34:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/230459#M16826</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-07-03T17:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/261740#M16827</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;metadata, f = dropbox.file_download_details('/test.pdf')&lt;BR /&gt;out = open('test.pdf', 'wb')&lt;BR /&gt;out.write(f.content)&lt;BR /&gt;out.close()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am getting the following error in terminal&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;metadata, f = dropbox.file_download_details('/test.pdf')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;AttributeError: 'module' object has no attribute 'file_download_details'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 11:04:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/261740#M16827</guid>
      <dc:creator>hilaal_leo</dc:creator>
      <dc:date>2018-01-22T11:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/261818#M16828</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/598232"&gt;@hilaal_leo&lt;/a&gt;&amp;nbsp;The official Python SDK doesn't have a `file_download_details` method. Please refer to my earlier posts in this thread for examples of how to download files using the SDK. There's also &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/cb149fafeedf08a6a0456219518aafda3a1fa3ca/example/updown.py#L157" target="_self"&gt;an example included with the SDK here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 16:29:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/261818#M16828</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-22T16:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/300720#M18217</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Greg,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am currently reading multiple files by a for loop and I dont want to keep saving these pdfs on my desktop and then reading them. Is there a way around this where I dont need to download the file?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 21:01:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/300720#M18217</guid>
      <dc:creator>JatinSingh2012</dc:creator>
      <dc:date>2018-10-02T21:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/300926#M18222</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/787508"&gt;@JatinSingh2012&lt;/a&gt;&amp;nbsp;Yes, you can use &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_download" target="_blank"&gt;the&amp;nbsp;files_download method&lt;/A&gt;&amp;nbsp;to read the file data without saving it to the local filesystem, like &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/c53a27e34c82a046853a1e94907c539f05cf5b94/example/updown.py#L157" target="_blank"&gt;the example here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 15:13:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/300926#M18222</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-10-03T15:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/354901#M20276</link>
      <description>&lt;P&gt;what dose the letter j means??&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 18:25:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/354901#M20276</guid>
      <dc:creator>hosamsandid</dc:creator>
      <dc:date>2019-07-12T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a file from using the Python Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/354928#M20278</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1184884"&gt;@hosamsandid&lt;/a&gt;&amp;nbsp;The variable 'j' was used in the original code sample shared in this thread, but the definition of its value wasn't shown. In that context though, it would've just been a file name, like "example.jpg".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It was used both on the&amp;nbsp;Dropbox API, formatted as "/example.jpg", for instance, and to open a local file.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 21:03:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Downloading-a-file-from-using-the-Python-Dropbox-API/m-p/354928#M20278</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-07-12T21:03:04Z</dc:date>
    </item>
  </channel>
</rss>

