This tutorial describes how to use the OSS console to create a bucket, upload, download, and share an object, and then delete the object and bucket.
Prerequisites
Object Storage Service (OSS) is activated.
Activating OSS is free of charge. Purchasing an OSS resource plan does not automatically activate OSS. The service must still be activated manually.
The operations in this tutorial may incur storage, API request, and outbound Internet traffic fees. Actual fees depend on the object size, storage duration, and outbound Internet traffic. For more information, see Billing overview and OSS pricing.
Create a bucket
A bucket is a container in which objects are stored. After a bucket is created, objects can be uploaded to and managed in the bucket.
-
Go to the Buckets page and click Create Bucket.
-
Configure the following parameters and retain the default settings for the other parameters.
Parameter
Example value
Description
Bucket Name
my-project-hangzhou-a1b2c3d4
Enter a globally unique name.
Region
China (Hangzhou)
Select a region close to the service users to reduce access latency. The region cannot be changed after the bucket is created. For more information, see Regions and endpoints.
-
Click Create and confirm that the bucket is created.
-
Click Go to Bucket to go to the bucket that you created.
Object operations
In OSS, a file is stored as an object. An object is the basic unit of data stored in a bucket. Follow these steps to upload, download, and share an object.
Upload an object
Upload a local file to the bucket created in the preceding section.
You can upload an object of up to 5 GB at a time in the console. To upload a larger object, we recommend that you use ossutil.
-
Click Upload Object.
-
Click Select Files and select a local file.
-
Click Upload Object and wait for the upload to complete.
After the upload is complete, the object list displays the object name, size, storage class, and other information.
Download an object
-
On the Objects page, click the name of the object that you uploaded or View Details.
-
Click Download to save the object to your local computer.
Share an object
You can share an object in a private bucket by using a signed URL that has a validity period.
Clean up resources
If the resources created in this tutorial are no longer needed, delete the object before deleting the bucket. Deleted resources cannot be recovered.
Delete the object
-
On the Objects page, select the object that you uploaded.
-
Click Permanently Delete and follow the on-screen instructions to confirm the operation.
Delete the bucket
After you delete a bucket, you must wait several hours, typically four to eight hours, before you can create another bucket that has the same name.
-
In the bucket menu bar, click Delete Bucket.
-
Make sure that Mandatory Item is complete and click Delete Immediately.
-
Enter the bucket name and click OK.