<?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: script to transfer files from remote server directly to Dropbox in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/416951#M22456</link>
    <description>&lt;P&gt;Gotcha. Thanks for the correction regarding Path parameter - temporary moment of absent-minded-ness - I'm glad you got the point anyway. Working on my script now - I'll post the solution when it hits production.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 15:21:09 GMT</pubDate>
    <dc:creator>daveh0</dc:creator>
    <dc:date>2020-05-04T15:21:09Z</dc:date>
    <item>
      <title>script to transfer files from remote server directly to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/415396#M22409</link>
      <description>&lt;P&gt;Hi - I have a script currently running on an Amazon Lightsail instance that copies files from 1 remote server ("remote Server 1") to a different remote server ("Remote Server 2") using a simple SCP command. Beyond accessing the files from Remote Server 1 and copying them to a specified location on Remote server 2, I do not have access to either of the remote servers... which is why I'm running the script from the AWS instance. Also, the request to Remote Server 1 must also be coming from a white-listed, dedicated IP otherwise I would just run this script from my home computer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Requirements have changed and now Remote server 2 needs to be a Dropbox location. I can see in the API documentation that I can copy LOCAL files directly to Dropbox, but I'm wondering if that PATH parameter can specify an SSH connection to another remote server??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So instead of:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl -X POST https://content.dropboxapi.com/2/files/upload \
    --header "Authorization: Bearer " \
    --header "Dropbox-API-Arg: {\"path\": \"/Homework/math/Matrices.txt\",\"mode\": \"add\",\"autorename\": true,\"mute\": false,\"strict_conflict\": false}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @local_file.txt&lt;/PRE&gt;
&lt;P&gt;it would be something like&lt;/P&gt;
&lt;PRE&gt;curl -X POST https://content.dropboxapi.com/2/files/upload \
    --header "Authorization: Bearer " \
    --header "Dropbox-API-Arg: {\"path\": \"me@Remote-server_1:/Homework/math/Matrices.txt\",\"mode\": \"add\",\"autorename\": true,\"mute\": false,\"strict_conflict\": false}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @local_file.txt&lt;/PRE&gt;
&lt;P&gt;Does anyone know if something like this is possible or would I have to copy the files from Remote Server 1 to the ASW instance and then use the API to move them from the AWS instance to Remote Server 2?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 05:24:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/415396#M22409</guid>
      <dc:creator>daveh0</dc:creator>
      <dc:date>2020-04-30T05:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: script to transfer files from remote server directly to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/415755#M22416</link>
      <description>&lt;P&gt;The&amp;nbsp;Dropbox API itself doesn't offer a way to get files directly from SSH connections like this, but to clarify, note that&amp;nbsp;the "path" parameter you're referring to is how you specify where in the connected&amp;nbsp;Dropbox account you want to put the uploaded file. It is not how you specify where the actual file data to upload comes from.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You send the file data you want to upload to the&amp;nbsp;Dropbox API&amp;nbsp;/2/files/upload endpoint in the HTTPS request body. In this curl example, that's done via curl's '--data-binary' option. In this sample, you're telling curl to upload the data from the local file with the name "local_file.txt" from the current directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be able to connect scp or ssh to curl and pipe the data directly through to the&amp;nbsp;Dropbox API endpoint, though I don't have a sample of how that might work. You'd need to refer to the ssh, scp, and/or curl documentation for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 15:43:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/415755#M22416</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-04-30T15:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: script to transfer files from remote server directly to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/416951#M22456</link>
      <description>&lt;P&gt;Gotcha. Thanks for the correction regarding Path parameter - temporary moment of absent-minded-ness - I'm glad you got the point anyway. Working on my script now - I'll post the solution when it hits production.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 15:21:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/script-to-transfer-files-from-remote-server-directly-to-Dropbox/m-p/416951#M22456</guid>
      <dc:creator>daveh0</dc:creator>
      <dc:date>2020-05-04T15:21:09Z</dc:date>
    </item>
  </channel>
</rss>

