POST/sharedrives/{sharedriveId}/files
공용 드라이브(공용 폴더)에 파일을 업로드하기 위한 URL을 생성한다. 사용자는 이 URL로 파일을 업로드한다.
참고
API를 이용한 콘텐츠 업로드 방법은 파일 업로드/다운로드를 참고한다.
OAuth 2.0 인증.
자세한 인증 방식은 인가·인증을 참고한다.
file
| Parameter | Type | Description |
|---|---|---|
| sharedriveId | string | 공용 드라이브 ID required example : @2101000000000008 |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
| Content-Type | string | application/json required example : application/json |
| Property | Type | Description |
|---|---|---|
| fileName | string | 파일 이름 required minLength : 1 maxLength : 200 |
| modifiedTime | string | 파일 수정 날짜 minLength : 1 format : date-time |
| fileSize | integer | 파일 크기 required maximum : 10737418240 format : int64 |
| overwrite | boolean | 파일 덮어쓰기 여부 default : false |
| suffixOnDuplicate | boolean | 자동 번호 추가 여부 default : false |
| resume | boolean | 이어올리기 여부. 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 | 파일 업로드 URL required |
| offset | integer | 업로드 요청 시 resume:true이면 이전에 실패한 업로드 요청의 이어올리기를 위해 설정하는 값. 예) fileSize가 1000이고, offset이 100인 경우 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}