<?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/Download files via shell (Android-Linux) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266590#M15642</link>
    <description>&lt;P&gt;Your code seems to be missing the part where you supply the file data for upload. You can find a sample of what the upload API call should look like in the documentation here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-upload" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#files-upload&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likewise, the download call has documentation and a sample here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#files-download&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/" target="_self"&gt;The API v2 Explorer&lt;/A&gt; can be useful for building these calls, e.g., for &lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/#files_upload" target="_self"&gt;upload&lt;/A&gt; and &lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/#files_download" target="_self"&gt;download&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2018 18:08:52 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-02-26T18:08:52Z</dc:date>
    <item>
      <title>Upload/Download files via shell (Android-Linux)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266459#M15635</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm looking for upload and download files from an Application folder I have created on my account (with token). -&amp;gt; e.g. = Applications &amp;gt; app_name &amp;gt; Private &amp;gt; file.xxx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code I will use on shell will be:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;curl -X POST &lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt; \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --header "Authorization: Bearer ACCESS_TOKEN" \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --header "Dropbox-API-Arg: {\"path\": \"/Private/file.xxx\"}" \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --header "Content-Type: application/octet-stream"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quesitons:&lt;/P&gt;&lt;P&gt;· Is the above code correct? Does it requiere more things to be added/modified?&lt;/P&gt;&lt;P&gt;· What should I add to the code to pick a specific file from x location to be uploaded? (e.g. = want to upload temp.txt file from /sdcard/Download/folder1/*)&lt;/P&gt;&lt;P&gt;· How may have this code to be modified to allow getting back that file, from my Dropxbox account, to my device again. (download file) [I think that replacing '&lt;EM&gt;...2/files/&lt;U&gt;upload&lt;/U&gt;&lt;/EM&gt;' by '&lt;EM&gt;.../&lt;U&gt;download&lt;/U&gt;&lt;/EM&gt;' will be enought]&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:15:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266459#M15635</guid>
      <dc:creator>SmartPhoneLover</dc:creator>
      <dc:date>2019-05-29T09:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Upload/Download files via shell (Android-Linux)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266590#M15642</link>
      <description>&lt;P&gt;Your code seems to be missing the part where you supply the file data for upload. You can find a sample of what the upload API call should look like in the documentation here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-upload" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#files-upload&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likewise, the download call has documentation and a sample here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#files-download&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/" target="_self"&gt;The API v2 Explorer&lt;/A&gt; can be useful for building these calls, e.g., for &lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/#files_upload" target="_self"&gt;upload&lt;/A&gt; and &lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/#files_download" target="_self"&gt;download&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 18:08:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266590#M15642</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-02-26T18:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Upload/Download files via shell (Android-Linux)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266605#M15644</link>
      <description>&lt;P&gt;Thank you. Yes, I forgot to add '--data-binay @...' at the end. Now works pefect!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 19:27:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266605#M15644</guid>
      <dc:creator>SmartPhoneLover</dc:creator>
      <dc:date>2018-02-26T19:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Upload/Download files via shell (Android-Linux)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266631#M15646</link>
      <description>I tried:&lt;BR /&gt;cd /sdcard/Download ; curl -X -O POST &lt;A href="https://content.dropboxapi.com/2/files/download" target="_blank"&gt;https://content.dropboxapi.com/2/files/download&lt;/A&gt; \&lt;BR /&gt;    --header "Authorization: Bearer TOKEN_ID" \&lt;BR /&gt;    --header "Dropbox-API-Arg: {\"path\": \"/Private/fmc_database.db\"}"&lt;BR /&gt;&lt;BR /&gt;...but Terminal tell me that Dropbox does not support the '-O' argument. So, what I need to add to the cmd to allow saving the file to my local storage's device?</description>
      <pubDate>Tue, 27 Feb 2018 00:16:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266631#M15646</guid>
      <dc:creator>SmartPhoneLover</dc:creator>
      <dc:date>2018-02-27T00:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Upload/Download files via shell (Android-Linux)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266713#M15655</link>
      <description>&lt;P&gt;The "-X" flag takes a parameter for the HTTP method to use, which should be "POST". In your code though, you've put the flag "-O" directly after that, so curl will send that as the method, which isn't valid. You would just need to move that out of that spot, e.g.,:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl -O -X POST https://content.dropboxapi.com/2/files/download \
--header "Authorization: Bearer TOKEN_ID" \
--header "Dropbox-API-Arg: {\"path\": \"/Private/fmc_database.db\"}"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That "-O" option isn't really well suited for the&amp;nbsp;Dropbox API though anyway, per the curl documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;       -O, --remote-name
              Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)

              The remote file name to use for saving is extracted from the given URL, nothing else.&lt;/PRE&gt;
&lt;P&gt;That would just take the name from the URL, which would just be "download". The&amp;nbsp;Dropbox API instead returns the file's metadata as JSON in the "dropbox-api-result" result header. You should parse it out from there instead if you want the actual file name.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 16:10:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Download-files-via-shell-Android-Linux/m-p/266713#M15655</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-02-27T16:10:06Z</dc:date>
    </item>
  </channel>
</rss>

