<?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 File transfer API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551601#M26229</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I started to become familiar with the Dropbox API (Python). I am looking for the API that will transfer a file from my Windows 10 machine to my Dropbox account. Looking at this sample code on the Dropbox website to backup a file:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;with &lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;(LOCALFILE&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'rb'&lt;/SPAN&gt;) &lt;SPAN&gt;as &lt;/SPAN&gt;f:&lt;BR /&gt;    &lt;SPAN&gt;# We use WriteMode=overwrite to make sure that the settings in the file&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    # are changed on upload&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;"Uploading " &lt;/SPAN&gt;+ LOCALFILE + &lt;SPAN&gt;" to Dropbox as " &lt;/SPAN&gt;+ BACKUPPATH + &lt;SPAN&gt;"..."&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;try&lt;/SPAN&gt;:&lt;BR /&gt;        dbx.files_upload(f.read()&lt;SPAN&gt;, &lt;/SPAN&gt;BACKUPPATH&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;mode&lt;/SPAN&gt;=WriteMode(&lt;SPAN&gt;'overwrite'&lt;/SPAN&gt;))&lt;BR /&gt;    &lt;SPAN&gt;except &lt;/SPAN&gt;ApiError &lt;SPAN&gt;as &lt;/SPAN&gt;err:&lt;BR /&gt;        ...........&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;Is there another API that does &lt;STRONG&gt;file transfer&lt;/STRONG&gt;, or this is how the file transfer is carried out by reading bytes from the source and writing to the destination (Just want to make sure I am not missing something)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 19:33:50 GMT</pubDate>
    <dc:creator>hrh747</dc:creator>
    <dc:date>2021-10-19T19:33:50Z</dc:date>
    <item>
      <title>File transfer API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551601#M26229</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I started to become familiar with the Dropbox API (Python). I am looking for the API that will transfer a file from my Windows 10 machine to my Dropbox account. Looking at this sample code on the Dropbox website to backup a file:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;with &lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;(LOCALFILE&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'rb'&lt;/SPAN&gt;) &lt;SPAN&gt;as &lt;/SPAN&gt;f:&lt;BR /&gt;    &lt;SPAN&gt;# We use WriteMode=overwrite to make sure that the settings in the file&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    # are changed on upload&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;"Uploading " &lt;/SPAN&gt;+ LOCALFILE + &lt;SPAN&gt;" to Dropbox as " &lt;/SPAN&gt;+ BACKUPPATH + &lt;SPAN&gt;"..."&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;try&lt;/SPAN&gt;:&lt;BR /&gt;        dbx.files_upload(f.read()&lt;SPAN&gt;, &lt;/SPAN&gt;BACKUPPATH&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;mode&lt;/SPAN&gt;=WriteMode(&lt;SPAN&gt;'overwrite'&lt;/SPAN&gt;))&lt;BR /&gt;    &lt;SPAN&gt;except &lt;/SPAN&gt;ApiError &lt;SPAN&gt;as &lt;/SPAN&gt;err:&lt;BR /&gt;        ...........&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;Is there another API that does &lt;STRONG&gt;file transfer&lt;/STRONG&gt;, or this is how the file transfer is carried out by reading bytes from the source and writing to the destination (Just want to make sure I am not missing something)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 19:33:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551601#M26229</guid>
      <dc:creator>hrh747</dc:creator>
      <dc:date>2021-10-19T19:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551648#M26230</link>
      <description>&lt;P&gt;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_upload" target="_self"&gt;The files_upload method&lt;/A&gt; is the right way to use the Dropbox API via the Python SDK to send some file data to the Dropbox servers and save it as a file in the connected Dropbox account. (Note that it only supports files up to 150 MB in size; for larger files, use &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_upload_session_start" target="_self"&gt;upload sessions&lt;/A&gt;.)&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 19:31:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551648#M26230</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-10-19T19:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551803#M26236</link>
      <description>&lt;P&gt;Thanks for your confirmation.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 16:06:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/File-transfer-API/m-p/551803#M26236</guid>
      <dc:creator>hrh747</dc:creator>
      <dc:date>2021-10-20T16:06:06Z</dc:date>
    </item>
  </channel>
</rss>

