Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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

Sharing Objects

Updated on 2024-03-04 GMT+08:00

Scenarios

You can share files with other users temporarily or permanently.

  • Temporary sharing:

    Share a file to other users through the temporary URL of the file. All shared URLs are temporary with a validity period.

    A temporary URL consists of the access domain name and the temporary authentication information of a file. Example:

    https://bucketname.obs.ap-southeast-1.myhuaweicloud.com:443/image.png?AccessKeyId=xxx&Expires=xxx&x-obs-security-token=xxx&Signature=xxx

    The temporary authentication information contains the AccessKeyId, Expires, x-obs-security-token, and Signature parameters. The AccessKeyId, x-obs-security-token, and Signature parameters are used for authentication. The Expires parameter specifies the validity period of the authentication.

    For details about the temporary authentication method and parameters, see Authentication of Signature in a URL in the Object Storage Service API Reference.

  • Permanent sharing:

    If you set the permission for an object to allow anonymous users to read it, anonymous users can access the object through the URL that you shared. For details about how to configure permissions, see Granting Public Read Permissions on Objects to Anonymous Users.

    The method of using a browser to access objects varies depending on the object type. You can directly open .txt and .html files using a browser. However, when you open .exe and .dat files using a browser, the files are automatically downloaded to your local computer.

    For details about how to obtain the object access URL, see How Do I Obtain the Access Path to an Object?

    If access to an object using the URL fails, fix the problem by referring to Why Can't I Access an Object Through Its URL?

Constraints

  • Objects in the Archive or Deep Archive storage class can be shared only after they have been restored.
  • An authorization code is not required for temporarily sharing a file. Temporarily sharing a folder requires an authorization code when the method of sharing by access code is used. For details, see Sharing a Folder.
  • Only buckets of version 3.0 or later support temporary file sharing. For details about how to query the bucket version, see Checking OBS Version (OBS 2.0 or OBS 3.0).
  • The following table describes the URL validity period of the files that are temporarily shared using different tools.

    Tool

    URL Validity Period

    OBS Console

    The URL is valid for 1 minute to 18 hours.

    After an object is shared, the system will generate a URL that contains the temporary authentication information, valid for five minutes since its generation by default. Each time you change the validity period of a URL, OBS obtains the authentication information again to generate a new URL for sharing. The new URL becomes valid at the moment the validity period is changed.

    SDKs

    Configure parameter Expires to specify when a temporary authorization expires. The temporary authorization expires in 24 hours.

    API

    Configure parameter Expires to specify when a temporary authorization expires. The temporary authorization expires in 24 hours.

    OBS Browser+

    When you log in to OBS Browser+ using an account and password, a shared URL can be valid for 24 hours at most. The default validity period is 10 hours.

    If a longer validity period is required, use the permanent AK/SK for login.

    obsutil

    Use the additional parameter e to specify when an object download URL expires. The minimum value is 60s and the default one is 300s. There is no upper limit on the expiration time.

How to Use

You can use OBS Console, SDKs, OBS Browser+, APIs, or obsutil to share files.

Tool

Reference

OBS Console

Sharing a File

SDKs

OBS supports software development kits (SDKs) in multiple languages. For details, see the corresponding developer guide on the SDK Overview page.

API

Authentication of Signature in a URL

OBS Browser+

Sharing a File or Folder

obsutil

Generating the Download Link of an Object

Related Operations

To download a generated temporary URL with wget, use "" and -O to specify the file name, or an error will occur.

Example:

[root@ecs-test ~]# wget "Temporary URL" -O abc

In the preceding command, abc indicates a new file name.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback