POST /api/v1/share
request body: none
response body:
write_id: a secret id to upload file
read_id: a public id to share file
POST /api/v1/attachment
request body:
write_id: a secret id to upload file
name: filename
response body:
upload_url: a url to upload file
see onedrive docs
upload file by chunks, file chunk must be multiples of 320KiB (327680 bytes) and no larger than 60MiB
PUT upload_url
request header:
Content-Length: total size of file
Content-Range: uploaded part range of file
request body: part of file content
response status:
202: continue uploading
200: file uploaded
GET /api/v1/share/<read_id>
response body:
value:
├ name: filename
├ size: file size (in bytes)
└ @microsoft.graph.downloadUrl: url for download