Dropbox API 通过curl上传文件
示例
这会将文件从matrices.txt当前文件夹中的本地路径/Homework/math/Matrices.txt上载到Dropbox帐户中,并返回上载文件的元数据:
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>应该用OAuth2访问令牌替换。