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

Temporarily Sharing Objects with Anonymous Users

Scenario

If you want to open an object to all users for a limited period of time, you can use the object sharing function.

Procedure for Sharing a File

  1. In the navigation pane of OBS Console, choose Object Storage.
  2. In the bucket list, click the bucket name you want to go to the Overview page.
  3. In the navigation pane, choose Objects.
  4. Locate the file to be shared and click Share in the Operation column.

    Once the Share File dialog box is opened, the URL is effective and valid for five minutes by default. If you change the validity period, the authentication information in the URL changes accordingly, and the URL's new validity period starts upon the change.

  5. Perform URL related operations.

    • Click Open URL to preview the file on a new page or directly download it to your default download path.
    • Click Copy Link to share the link to other users, so that they can enter the link to a web browser to access the file.
    • Click Copy Path to share the file path to users who have access permissions to the bucket. Then the users can search for the file by pasting the path to the search box of the bucket.

    Within the URL validity period, anyone who has the URL can access the file.

Procedure for Sharing a Folder

  1. In the navigation pane of OBS Console, choose Object Storage.
  2. In the bucket list, click the bucket name you want to go to the Overview page.
  3. In the navigation pane, choose Objects.
  4. Locate the folder you want to share and click Share in the Operation column. The Share Folder dialog box is displayed.
  5. Configure parameters.

    Table 1 Parameters for sharing a folder

    Parameter

    Description

    URL Validity Period

    The validity period is measured by minutes or hours, and ranges from one minute to 18 hours. The default value is five minutes.

    Within the URL validity period, anyone who has the URL can access the folder.

    Access Code

    A six-digit code.

    An extraction code is required to access a shared folder.

  6. Click Create Share to generate a sharing URL for the folder.
  7. You can send the URL and extraction code to other users. Then they can access the folder using the URL and the extraction code.

Verification

Verify that other users can access the shared folder through the URL.

  1. Open a web browser, enter the shared URL, and open it.
  2. In the dialog box that is displayed, enter the access code and access objects in the shared folder.

Verify that other users can access the shared folder through OBS Browser+.

  1. Start OBS Browser+.
  2. On the login page, click Authorization Code Login.
  3. Enter the authorization code and access code.
  4. Click Log In to access the shared folder.