최신 업데이트:2025-08-18 15:54:03
사용자가 모든 세그먼트(파트)를 업로드한 후, “세그먼트 병합” 인터페이스를 호출하여 서버 측에서 사용자가 지정한 세그먼트를 하나의 완전한 객체로 병합할 수 있습니다. “세그먼트 병합” 작업을 수행하기 전에는 업로드된 데이터를 다운로드할 수 없습니다.
세그먼트를 병합할 때, 멀티파트 업로드 작업 초기화 시 기록된 추가 메시지 헤더 정보를 객체 메타데이터로 복사해야 하며, 이 처리 과정은 일반 객체 업로드 시 헤더 처리 방식과 동일합니다.
업로드된 세그먼트의 경우, 해당 멀티파트 업로드 작업이 취소되지 않는 한 사용자의 저장 용량이 계속 점유됩니다. “세그먼트 병합” 작업이 완료되면 병합에 포함된 세그먼트 데이터만 용량을 점유하며, 병합 시 포함되지 않은 나머지 데이터는 “병합” 완료 후 삭제되어 점유 공간이 해제됩니다.
병합된 멀티파트 업로드 데이터는 기존 객체 다운로드 인터페이스를 통해 전체 멀티파트 업로드 객체를 다운로드할 수 있습니다.
병합된 멀티파트 업로드 데이터는 기존 객체 삭제 인터페이스를 통해 삭제할 수 있으며, 전체 멀티파트 업로드 객체의 모든 파트 데이터가 삭제됩니다. 삭제 후에는 복원이 불가합니다.
병합된 멀티파트 업로드 데이터는 전체 객체의 MD5 값을 Etag로 기록하지 않습니다. 멀티파트 데이터의 Etag 생성 방식은 다음과 같습니다: MD5(M1M2……MN)-N. 여기서 Mn은 n번째 파트의 MD5 값, N은 파트의 총 개수입니다.
POST /ObjectName?uploadId=uploadID HTTP/1.1
Host: Bucket.Endpoint
Date: date
Content-Length: length
Authorization: authorization
<CompleteMultipartUpload>
<Part>
<PartNumber>partNum1</PartNumber>
<ETag>etag1</ETag>
</Part>
<Part>
<PartNumber>partNum2</PartNumber>
<ETag>etag2</ETag>
</Part>
<Part>
<PartNumber>partNum3</PartNumber>
<ETag>etag3</ETag>
</Part>
</CompleteMultipartUpload>
| 파라미터명 | 설명 | 필수 여부 |
|---|---|---|
| uploadId | Initiate Multipart Upload 응답의 upload id | 예 |
common request headers만 사용합니다.
요청 본문은 XML 형식의 파트 정보입니다.
| 요소명 | 설명 | 필수 여부 |
|---|---|---|
| CompleteMultipartUpload | 병합할 세그먼트(파트) 목록. 타입: XML 부모 노드: 없음 자식 노드: 1개 이상 Part 요소 |
예 |
| Part | 업로드 세그먼트를 구성하는 요소의 목록. 타입: XML 부모: CompleteMultipartUpload 자식: PartNumber, ETag |
예 |
| PartNumber | 세그먼트 번호. 타입: integer 부모: Part |
예 |
| ETag | 해당 세그먼트의 ETag 값. 타입: string 부모: Part |
예 |
HTTP/1.1 status_code
x-wos-request-id: request id
Content-Type: application/xml
Content-Length: length
Date: date
Connection: state
Server:WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CompleteMultipartUploadResult xmlns="https://www.wangsu.com/document">
<Location>http://example-Bucket.Endpoint/example-Object</Location>
<Bucket>BucketName</Bucket>
<Key>ObjectName</Key>
<ETag>ETag</ETag>
</CompleteMultipartUploadResult>
common response headers만 사용합니다.
| 요소 | 설명 |
|---|---|
| CompleteMultipartUpload | 응답 컨테이너 타입: XML 자식 노드: Location, Bucket, Key, ETag 부모: 없음 |
| Location | 병합된 객체의 URL 타입: string 부모 노드: CompleteMultipartUpload |
| Bucket | 병합된 세그먼트가 위치한 공간명 타입: string 부모 노드: CompleteMultipartUpload |
| Key | 병합된 객체의 키 타입: string 부모 노드: CompleteMultipartUpload |
| ETag | 각 세그먼트의 ETag로 계산된 결과 값. 타입: string 부모 노드: CompleteMultipartUpload |
| 상황 | HTTP 상태 | 에러 코드 | 메시지 |
|---|---|---|---|
| 본문 XML 데이터의 etag 값이 잘못되었을 경우 | 400 Bad Request | InvalidPart | One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part’s entity tag. |
| xml 데이터가 없는 경우 | 400 Bad Request | InvalidRequest | You must specify at least one part |
| Xml 데이터 형식이 오류(예: partNumber 태그 누락 등)일 경우 | 400 Bad Request | MalformedXML | The XML you provided was not well-formed or did not validate against our published schema |
POST /example-object?uploadId=AAAsb2FkIElEIGZvciBlbHZpbmcncyWeeS1tb3ZpZS5tMnRzIRRwbG9hZA HTTP/1.1
Host: bucket.s3-cn-east-1.wcsapi.com
Date: Mon, 1 Nov 2020 20:34:56 GMT
Content-Length: 391
Authorization: WOS AKIAIOSFODNN7EXAMPLE:0RQf4/cRonhpaBX5sCYVf1bNRuU=
<CompleteMultipartUpload>
<Part>
<PartNumber>1</PartNumber>
<ETag>"a54357aff0632cce46d942af68356b38"</ETag>
</Part>
<Part>
<PartNumber>2</PartNumber>
<ETag>"0c78aef83f66abc1fa1e8477f296d394"</ETag>
</Part>
<Part>
<PartNumber>3</PartNumber>
<ETag>"acbd18db4cc2f85cedef654fccc4a4d8"</ETag>
</Part>
</CompleteMultipartUpload>
HTTP/1 200 OK
x-wos-request-id: 100315319214214320170602225414pFHJIshn
Access-Control-Allow-Origin: *
Connection: close
Content-Type: application/xml
Content-Length: 301
Date: Mon, 05 Jun 2017 09:56:01 GMT
Server: WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CompleteMultipartUploadResult xmlns="https://www.wangsu.com/document">
<Bucket>r28-sync-data</Bucket>
<ETag>4dc0dc31f93e3f73c52ce251fcdfcaa2-2</ETag>
<Key>multiobject</Key>
<Location>http://example-Bucket.Endpoint/example-Object</Location>
</CompleteMultipartUploadResult>