Page 1 of 1

Dropbox upload with HTTP request

Posted: Sat Feb 11, 2017 9:46 pm
by simon.schvartzman
Searching the Dropbox site I found this link https://dropbox.github.io/dropbox-api-v ... pha/upload which with a user friendly interface builds and API request and shows how the HTTP request code should be

In my case, in order to be able to upload an image file I get this
POST /2/files/alpha/upload
Host: https://content.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer thetokengivenatthetopofthepage
Content-Type: application/octet-stream
Dropbox-API-Arg: {"path":"/home/Test.jpg","mode":{".tag":"add"}}
Content-Length: 625514

--- (content of IMG_0456.JPG goes here) ---
How can I build this HTTP request using LC? I'm not clear as what I have to remove, how to concatenate the different parts and how to include the IMG_0456.JPG contents.

I guess this could be very useful to other users if it runs OK.

Thanks...

Re: Dropbox upload with HTTP request

Posted: Sun Feb 12, 2017 3:42 pm
by Mikey
There are three different Dropbox libraries for LC. There is the mergdropbox external, the phx_dropboxLib, and the i think the other is called Dropbox_v2 or something like that. All three wrap the Dropbox API for use in LC.