检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Ways to Upload You can use SDKs, OBS Browser+, or obsutil to upload objects. Using SDKs Java Python C Go BrowserJS .NET Android iOS PHP Node.js Using the GUI Tool - OBS Browser+ Log in to OBS Browser+. Click the bucket where you want to upload files or folders.
// require 'obs-autoloader.php'; // Declare the namespace. use Obs\ObsClient; // Create an instance of ObsClient. $obsClient = new ObsClient ( [ //Obtain an AK/SK pair using environment variables or import the AK/SK pair in other ways.
To handle the error codes possibly returned during the operation, see OBS Server-Side Error Codes. Parent topic: Object Download
To handle the error codes possibly returned during the operation, see OBS Server-Side Error Codes. Parent topic: Versioning Management
SSE-C OBS BrowserJS SDK supports the following two types of encryption/decryption mode: Encryption/Decryption Type Request Parameter Description SSE-KMS SseKms Indicates that SSE-KMS mode is used. Currently, only kms is supported.
HTTPS protocol: OBS_PROTOCOL_HTTPS OBS_PROTOCOL_HTTPS access_key AK of OBS NULL - secret_access_key SK used for authentication. It can be used to sign a character string.
OBS only supports redirection for objects in the root directory of a bucket.
For details, see Introduction to OBS Access Control, IAM Custom Policies, and Creating a Custom Bucket Policy. The mapping between OBS regions and endpoints must comply with what is listed in Regions and Endpoints.
OBS Android SDK provides abundant APIs for object download in the following modes: Performing a Streaming Download Performing a Partial Download Performing a Resumable Download You can call ObsClient.getObject to download an object. Parent topic: Object Download
Restrictions To truncate an object, you must be the PFS owner or have the required permission (obs:bucket:PutObject in IAM or PutObject in a policy). For details, see Introduction to OBS Access Control, IAM Custom Policies, and Configuring an Object Policy.
For details, see Introduction to OBS Access Control, IAM Custom Policies, and Configuring an Object Policy. The mapping between OBS regions and endpoints must comply with what is listed in Regions and Endpoints.
Restrictions To obtain the download progress, you must be the bucket owner or have the required permission (obs:object:GetObject in IAM or GetObject in a bucket policy). For details, see Introduction to OBS Access Control, IAM Custom Policies, and Configuring an Object Policy.
Restrictions To delete an object, you must be the bucket owner or have the required permission (obs:object:DeleteObject in IAM or DeleteObject in a bucket policy). For details, see Introduction to OBS Access Control, IAM Custom Policies, and Configuring an Object Policy.
For details about how to use bucket ACLs to manage permissions, see the permission control in the OBS Permission Configuration Guide. Request Syntax 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 PUT /?
Constraints: None Range: STANDARD (Standard storage) WARM (Infrequent Access storage) COLD(Archive storage) DEEP_ARCHIVE (Deep Archive storage) Default value: None x-obs-version String Definition: OBS version of the bucket.
or Deep Archive From Archive to Deep Archive When a lifecycle rule is applied, OBS transitions objects based on the versioning state of your bucket.
If the part number you set is out of this range, OBS will return error 400 Bad Request. The minimum part size supported by an OBS 3.0 bucket is 100 KB, and the minimum part size supported by an OBS 2.0 bucket is 5 MB.
Constraints: When you configure a lifecycle rule by specifying a prefix, if the specified prefix and the prefix of an existing lifecycle rule overlap, OBS regards these two rules as one and forbids you to configure this rule.
OBS does not involve folders like in a file system. All elements in buckets are objects. To create a folder in OBS is essentially to create an object whose size is 0 and whose name ends with a slash (/).
OBS .NET SDK provides abundant APIs for downloading objects in the following modes: Performing a Streaming Download Performing a Partial Download Performing an Asynchronous Download Performing a Conditioned Download Performing a Resumable Download You can call ObsClient.GetObject