百度智能云

All Product Document

          Object Storage

          UploadPart

          Interface Description

          After calling InitiateMultipartUpload to get UploadId, we need to upload the data (part) after the object splitting through the UploadPart command. To identify the relative position of each part in the object, you need to specify a partNumber parameter in UploadPart. The value range of partNumber is 1-10,000. The size of the BOS Part is limited. Except for the last part, other parts should be greater than or equal to 5 MB or be an integral multiple of 1 MB. A single part cannot exceed 5 GB, and the size of the whole object cannot exceed 5 TB.

          Request

          • Request syntax

            PUT /<ObjectName>?partNumber=PartNumber&uploadId=UploadId HTTP/1.1
            Host: <BucketName>.bj.bcebos.com
            Date: <Date>
            Authorization: <AuthorizationString>
            Content-Length: <ContentLength>
          • Request header field

            Name Type Description
            Content-MD5 String The MD5 digest of the HTTP request content defined in RFC2616 can be contained to verify whether the file saved in BOS is consistent with the user's expected file.
            x-bce-content-sha256 String It verifies whether the file saved in BOS is consistent with the user expected file through this field, and the verification accuracy of Sha256 is higher. The Sha256 value of the data transmitted must match it. Otherwise, UploadPart fails.
            x-bce-content-crc32 String It uploads the CRC (cyclic redundancy check) value of the object.
          • Request parameters

            Name Type Parameter Position Description Required?
            partNumber Int Query Parameters Relative position of this part uploaded in object Yes
            uploadId String Query Parameter UploadId got by InitiateMultipartUpload Yes

          Response

          • Response element

            None

          • Response header field

            Name Type Description
            ETag String ETag of each MultiPartUpload
            Others - Other header fields related to RFC2616

            Consideration

            UploadPart returns the eTag of this part. This eTag is required in the third step of MultipartUpload. It is also recommended that users verify the correctness of the data uploaded through eTag.

          Example

          • Request example

            PUT /ObjectName?partNumber=PartNumber&uploadId=UploadId HTTP/1.1
            Host: BucketName.bj.bcebos.com
            Date: Wed, 06 Apr 2016 06:34:40 GMT
            Authorization: AuthorizationString
            Content-length:2794
            Content-Type:text/plain
            
            [2794 bytes of object data]
          • Response example

            HTTP/1.1 200 OK
            x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409
            Date: Wed, 06 Apr 2016 06:34:40 GMT
            ETag: "b54357faf0632cce46e942fa68356b38"
            Content-Length: 0
            Connection: keep-alive
            Server: BceBos
          Previous
          ListParts
          Next
          UploadPartCopy