DEV Community

Cover image for Creating storage for the website accessible to the general public, soft delete and versioning
Olalekan Oladiran
Olalekan Oladiran

Posted on

Creating storage for the website accessible to the general public, soft delete and versioning

Customer success stories, marketing materials, product photos, and videos are all available on the corporate website. Clients come from all around the world, and demand is growing quickly. Low latency load times are required for the content because it is mission-critical. It's critical to monitor document versions and act swiftly to recover destroyed documents.

Creating a storage account with high availability

  • In the market place search for storage account and select create Image description
  • In the project details, select the resource group you just created Image description
  • Under the instance details, supply the name for your storage account. Image description
  • Click review Image description
  • Once validation is passed, click create Image description
  • Wait for it to deploy Image description
  • After deployment is done, click go to resource Image description
  • After clicking go to resource, in the data management section, select redundancy blade Image description
  • Select Read -access Geo-redundant storage Image description
  • Click save Image description

Enabling Allow blob anonymous access

Customers should not need to log in to obtain information on the public website.

  • in the settings section, select configuration Image description
  • Enable allow blob anonymous access Image description

Create a container for blob storage with anonymous read access.

  • Select containers in the Data storage section Image description
  • Select + container Image description
  • Supply the name for the container and click create
    Image description

  • Clients ought to be able to see the pictures without requiring authentication. Set up read access to the public container blobs anonymously.

  • Select the newly created container
    Image description

  • Click change access level
    Image description

  • change access level to blob(anonymous read access for blobs only)
    Image description

  • Click Ok
    Image description

Testing the container for access.

  • After changing the access level, click upload to send a file into the container Image description
  • Click browse a file to select a file to upload Image description
  • After selecting a file, click upload Image description
  • Click on the uploaded file Image description
  • Copy the url in the overview tab Image description
  • Search the copied url in a new browser and it will be displayed in the browser

Setting up soft delete

  • Return to the overview page and select blob soft delete in the blob service section Image description
  • Click Enabled(7 days) in front of soft delete, Tick enable soft delete for blobs and change the keep deleted blobs for (in days) to 21 days Image description
  • Click save Image description

Testing the configured soft delete

  • Go to the container containing our uploaded file and delete the file Image description Image description
  • Click on the slider beside show deleted blobs to show deleted files Image description
  • Click the ellipses on the extreme right, select undelete to restore the deleted file Image description

Setting up blob versioning

  • Still under the overview page of the storage account, in the properties section under blob service, click Disabled in front of versioning to go to the versioning settings Image description
  • Tick enable versioning for blobs Image description
  • Click save Image description

Testing the versioning set up

  • Go to the container to upload another version of the initial uploaded file. This will overwrite the existing file.
  • To get the list of the previous file, click the ellipses at the extreme right of the file and select view versions Image description
  • This will bring a pane showing all the previous versions Image description

Top comments (0)