I am using MultipartEntityBuilder to create Entity in java. MultipartEntityBuilder needs boundary value to be set. but dropbox is not allowing it to send.
when i do that, i m getting below error.
Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "text/plain; boundary=dRUj2TWABj74JeYRtJ2MYFIjWDyjWrAaMQE". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".
The data for the file you're uploading should be sent in the request body, with a "Content-Type" header or "application/octet-stream" of "text/plain; charset=dropbox-cors-hack". (The first one is preferred.)
If you're using Java though, we recommend using the official Java SDK, which will do most of the work for you: