Example of DropBox API PUT using Curl and Oauth 2 to Upload a file to DropBox

后端 未结 3 1049

I am searching everywhere and haven\'t been able to locate a suitable example and am not well versed enough to be able to sort it out via the docs. Could someone with more

3条回答
  •  既然无缘
    2020-12-31 20:07

    Here is working codes to upload file in dropbox via CURL request.

    curl -X POST https://content.dropboxapi.com/2/files/upload \
      --header "Authorization: Bearer " \
      --header "Dropbox-API-Arg: {\"path\": \"/file_path.txt\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}" \
      --header "Content-Type: application/octet-stream" \
      --data-binary "@file_path.txt"
    

提交回复
热议问题