You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Trương K.'s avatar
Trương K.
New member | Level 1
10 years ago

Api v2 upload document wrong

an wrong in dropbox api v2 document

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}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @local_file.png

when i set header
--header "Content-Type: application/octet-stream" \

=> can't send/ return error 

but when i remove that header and add 

--header "Content-Type: text/plain; charset=dropbox-cors-hack" \

=> return 200, succeed,
recheck: file was upload successful