检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
The OBS server automatically clears expired objects. The object expiration time set in the preceding method takes precedence over the bucket lifecycle rule. Parent topic: Object Upload
uploadID:@"uploadID"]; [client copyPart:copyRequest completionHandler:^(OBSCopyPartResponse *response, NSError *error) { NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
meta:%@\n storageClass:%@\n websiteRedirectlocation:%@\n size:%@",response.metaDataDict,response.storageClass,response.websiteRedirectLocation,response.size); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
request.srcObjectVersionID = @"testVersionID"; [client copyObject:request completionHandler:^(OBSCopyObjectResponse *response, NSError *error){ NSLog(@"%@",response); }] ; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
You can set the following conditions: Parameter Description Method in OBS Android SDK If-Modified-Since Returns the object if it has been modified since the specified time; otherwise, an error is returned.
String.valueOf(rule.getNoncurrentVersionExpiration().getDays()) : ""); } To handle the error codes possibly returned during the operation, see OBS Server-Side Error Codes. Parent topic: Lifecycle Management
Alternatively, you can call GetObjectResponse.WriteResponseStreamToFile provided by OBS .NET SDK to download the object content to a local file.
OBS can be used to process images in a stable, secure, efficient, easy to use, and cost-efficient manner.
You can perform the following to implement website file hosting: Upload the website files to your bucket in OBS as objects and set the MIME type for the objects. Set the object ACL to public read. Access the objects using a browser.
// 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.
// 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.
result.InterfaceResult.LoggingEnabled.TargetGrants[i]['Grantee']['URI']); console.log('Permission-->' + result.InterfaceResult.LoggingEnabled.TargetGrants[i]['Permission']); } } } }); To handle the error codes possibly returned during the operation, see OBS
The sample code for uploading an object is as follows: // Import the OBS library. // Use npm to install the client. var ObsClient = require('esdk-obs-nodejs'); var crypto = require('crypto'); var fs = require('fs'); // Use the source code to install the client. // var ObsClient =
OBS provides three storage classes for buckets. For details, see Storage Class. Sample code is as follows: // Hard-coded or plaintext AK/SK are risky. For security purposes, encrypt your AK/SK and store them in the configuration file or environment variables.
The OBS server will compare this MD5 value with the MD5 value obtained by object data calculation. If the two values are not the same, the upload fails with an HTTP 400 error returned. If the MD5 value is not specified, the OBS server will skip MD5 value verification.
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.
of a versioning object"; [client restoreObject:request completionHandler:^(OBSRestoreObjectResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
Parameter Description Property in OBS .NET SDK ContentType Rewrites Content-Type in HTTP/HTTPS responses. GetObjectRequest.ResponseHeaderOverrides.ContentType ContentLanguage Rewrites Content-Language in HTTP/HTTPS responses.
// require 'obs-autoloader.php'; // Declare the namespace. use Obs\ObsClient; // Create an ObsClient instance. $obsClient = new ObsClient ( [ //Obtain an AK/SK pair using environment variables or import the AK/SK pair in other ways.
The OBS server automatically clears expired objects. The object expiration time set in the preceding method takes precedence over the bucket lifecycle rule. Parent topic: Object Upload