POST/sharedrives/{sharedriveId}/files/{fileId}
Creates a URL for uploading a file to a collaborative drive. Users can use this URL to upload files.
Note
- For how to download content using the API, see Upload or Download Files.
OAuth 2.0 authentication.
For more information, see Authentication and Authorization.
file
| Parameter | Type | Description |
|---|---|---|
| sharedriveId | string | Collaborative drive ID required example : @2101000000000008 |
| fileId | string | File ID required example : NzExNTMwMDF8MTQ2NzA1NjAxMDAwMHxGfDA |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
| Content-Type | string | application/json required example : application/json |
| Property | Type | Description |
|---|---|---|
| fileName | string | File name required minLength : 1 maxLength : 200 |
| modifiedTime | string | File update date minLength : 1 format : date-time |
| fileSize | integer | File size required maximum : 10737418240 format : int64 |
| overwrite | boolean | Indicates whether to overwrite the file. default : false |
| suffixOnDuplicate | boolean | Indicates whether to use automatic numbering default : false |
| resume | boolean | Indicates whether the upload is resumable. default : false |
example
1{2 "fileName": "works.txt",3 "modifiedTime": "2019-08-24T14:15:22Z",4 "fileSize": 100,5 "overwrite": false,6 "resume": false,7 "suffixOnDuplicate": false8}example(resume)
1{2 "fileName": "works.txt",3 "modifiedTime": "2019-08-24T14:15:22Z",4 "fileSize": 100,5 "overwrite": false,6 "resume": true,7 "suffixOnDuplicate": false8}OK
| Property | Type | Description |
|---|---|---|
| uploadUrl | string | File upload URL required |
| offset | integer | It is used to resume the previously interrupted upload if Example) If format : int64 |
example
1{2 "uploadUrl": "https://apis-storage.worksmobile.com/k1/drive/r/24101/160521/160521/100001500064253/3472589353794602761?param=ewogICJwYXJlbnRLZXkiIDogInJvb3QiLAogICJmaWxlTmFtZSIgOiAi7ZWc6riALnR4dCIsCiAgImZpbGVTaXplIiA6IDMsCiAgIm1vZGlmaWVkVGltZSIgOiAiMjAxOS0wOC0yNFQxNDoxNToyMloiLAogICJhZGRvbktleSIgOiBudWxsCn0&writeMode=none&auth=OPEN",3 "offset": 04}example(resume)
1{2 "uploadUrl": "https://apis-storage.worksmobile.com/k1/drive/r/24101/160521/160521/100001500064253/3472589353794602761?param=ewogICJwYXJlbnRLZXkiIDogInJvb3QiLAogICJmaWxlTmFtZSIgOiAi7ZWc6riALnR4dCIsCiAgImZpbGVTaXplIiA6IDMsCiAgIm1vZGlmaWVkVGltZSIgOiAiMjAxOS0wOC0yNFQxNDoxNToyMloiLAogICJhZGRvbktleSIgOiBudWxsCn0&writeMode=resume&rangeStartOffset=100&auth=OPEN",3 "offset": 1004}