هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Uploading Parts

Updated on 2024-09-29 GMT+08:00

Functions

After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. When parts are uploaded in a multipart upload of an object, the upload sequence does not affect part merging, namely, multiple parts can be uploaded concurrently.

Part sizes range from 100 KB to 5 GB. However, when parts are being merged, the size of the last uploaded part ranges from 0 to 5 GB. The upload part ID ranges from 1 to 10,000.

This operation supports server-side encryption.

NOTICE:

The value of partNumber in a multipart task is unique. If you upload a part of the same partNumber repeatedly, the last part uploaded will overwrite the previous one. When multiple concurrent uploading of the same partNumber part of the same object is performed, the Last Write Win policy is applied. The time of Last Write is defined as the time when the metadata of the part is created. To ensure data accuracy, the client must be locked to ensure concurrent upload of the same part of the same object. Concurrent upload of different parts of the same object does not need to be locked.

Request Syntax

PUT /ObjectName?partNumber=partNum&uploadId=uploadID  HTTP/1.1  
Host: bucketname.obs.region.myhuaweicloud.com 
Date: date
Content-Length: length 
Authorization: authorization
Content-MD5:md5
<object Content>

Request Parameters

This request uses parameters to specify the upload task ID and part number. Table 1 describes the parameters.

Table 1 Request parameters

Parameter

Type

Mandatory (Yes/No)

Description

partNumber

Integer

Yes

Explanation:

Indicates the ID of a part to be uploaded.

Restrictions:

None

Value range:

An integer ranging from 1 to 10000.

Default value:

None

uploadId

String

Yes

Explanation:

Indicates a multipart upload ID.

Restrictions:

None

Value range:

None

Default value:

None

Request Headers

This request uses common headers. For details, see Table 3.

Table 2 Server-side encryption request headers

Header

Type

Mandatory (Yes/No)

Description

x-obs-server-side-encryption-customer-algorithm

String

No. This header is required when SSE-C is used. The encryption algorithm must be the same as that used to initiate multipart upload tasks.

Explanation:

The algorithm used for encryption.

Example: x-obs-server-side-encryption-customer-algorithm:AES256

Restrictions:

  • Indicates the encryption algorithm used when SSE-C is used.
  • This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

Value range:

AES256

Default value:

None

x-obs-server-side-encryption-customer-key

String

No. This header is required when SSE-C is used. The key must be the same as that used to initiate multipart upload tasks.

Explanation:

The key used for encrypting an object.

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

Restrictions:

  • This header is used only when SSE-C is used for encryption.
  • This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

Value range:

None

Default value:

None

x-obs-server-side-encryption-customer-key-MD5

String

No. This header is required when SSE-C is used. The MD5 value must be the same as that used to initiate multipart upload tasks.

Explanation:

The MD5 value of the encryption key. The MD5 value is used to check whether any error occurs during the transmission of the key.

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

Restrictions:

This header is used only when SSE-C is used for encryption.

This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

Value range:

Base64-encoded MD5 value of the key ID.

Default value:

None

Request Elements

This request involves no elements.

Response Syntax

1
2
3
4
HTTP/1.1 status_code
Date: date
ETag: etag
Content-Length: length

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

This response contains no elements.

Error Responses

  1. If a part number is not within the range from 1 to 10000, OBS returns 400 Bad Request.
  2. If a part size has exceeded 5 GB, the error code 400 Bad Request is returned.
  3. If the AK or signature is invalid, OBS returns 403 Forbidden and the error code is AccessDenied.
  4. Check whether the bucket exists. If the bucket is not found, OBS returns 404 Not Found and the error code is NoSuchBucket.
  5. View the bucket ACL to check whether the user has the read permission for the requested bucket. If the user does not have the read permission, OBS returns 403 AccessDenied.
  6. Check whether the multipart upload task exists. If the task does not exist, OBS returns 404 Not Found and the error code is NoSuchUpload.
  7. Check whether the request user is the initiator of the multipart upload task. If not, OBS returns 403 Forbidden and the error code is AccessDenied.

Other errors are included in Table 2.

Sample Request

PUT /object02?partNumber=1&uploadId=00000163D40171ED8DF4050919BD02B8 HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 05:15:55 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:ZB0hFwaHubi1aKHv7dSZjJts40g=
Content-Length: 102015348

[102015348 Byte part content]

Sample Response

1
2
3
4
5
6
7
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 8DF400000163D40956A703289CA066F1
ETag: "b026324c6904b2a9cb4b88d6d61c81d1"
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCUQu/EOEVSMa04GXVwy0z9WI+BsDKvfh
Date: WED, 01 Jul 2015 05:15:55 GMT
Content-Length: 0

Sample Request: Uploading a Part, with Server-Side Encryption Headers Included

PUT /object02?partNumber=1&uploadId=00000163D40171ED8DF4050919BD02B8 HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 05:15:55 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:ZB0hFwaHubi1aKHv7dSZjJts40g=
Content-Length: 102015348
x-obs-server-side-encryption-customer-key: g0lCfA3Dv40jZz5SQJ1ZukLRFqtd093ksp192   
x-obs-server-side-encryption-customer-key-MD5: Eo93ne1X/iTcs0132  
x-obs-server-side-encryption-customer-algorithm: AES256  
 
[102015348 Byte part content]

Sample Response: Uploading a Part, with Server-Side Encryption Headers Included

HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 8DF400000163D40956A703289CA066F1
ETag: "b026324c6904b2a9cb4b88d6d61c81d1"
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCUQu/EOEVSMa04GXVwy0z9WI+BsDKvfh
Date: WED, 01 Jul 2015 05:15:55 GMT
Content-Length: 0
x-obs-server-side-encryption-customer-algorithm: AES256
x-obs-server-side-encryption-customer-key-MD5: Eo93ne1X/iTcs0132

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback