我想将文件上传到亚马逊云驱动器。谁能帮我用 curl 格式化这个命令
接口说明:
上传文件 上传文件内容及其元数据信息。
POST : {{contentUrl}}/nodes?suppress={suppress}
suppress : (Optional)
deduplication: disables checking for duplicates when uploading
车身参数:
Multi-form part
--------- metadata ------------
name (required) : file name. Max to 256 Characters.
kind (required) : "FILE"
labels (optional) : Extra information which is indexed. For example the value can be "PHOTO"
properties (optional) : List of properties to be added for the file.
parents(optional) : List of parent Ids. If no parent folders are provided, the file will be placed in the default root folder.
---------content ------------
File Bytes
样品要求:
POST /cdproxy/nodes?localId=testPhoto
HTTP/1.1
Host: content-na.drive.amazonaws.com
Authorization: Bearer
Atza|IQEBLjAsAhReYeezFcFdYzqrFOJGv3EG
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="metadata"
{"name":"fooo.jpg","kind":"FILE"}
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="content";
filename="db5df4870e4e4b6cbf42727fd434701a.jpg"
Content-Type: image/jpeg
----WebKitFormBoundaryE19zNvXGzXaLvS5C
卷曲请求:
curl -v -X POST --form
'metadata={"name":"testVideo1","kind":"FILE"}' --form
'content=@sample_iTunes.mp4'
'https://content-na.drive.amazonaws.com/cdproxy/nodes?localId=testVideo1&suppress=deduplication'
--header "Authorization: Bearer
Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM"
https://developer.amazon.com/public/apis/experience/cloud-drive/content/nodes