This uploads a file from the local path matrices.txt
in the current folder to /Homework/math/Matrices.txt
in the Dropbox account, and returns the metadata for the uploaded file:
echo "some content here" > matrices.txt
curl -X POST https://content.dropboxapi.com/2/files/upload \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--header "Dropbox-API-Arg: {\"path\": \"/Homework/math/Matrices.txt\"}" \
--header "Content-Type: application/octet-stream" \
--data-binary @matrices.txt
<ACCESS_TOKEN>
should be replaced with the OAuth 2 access token.