In this post, I'll be showing you how to create and configure a storage account for a company's website. The storage account is for product images and videos, documents and so on. Requirements for this are:
Storage account with high availability.
Storage account should have anonymous public access.
Blob storage container for the website images, videos and other documents.
Soft delete so files can be easily restored.
Blob versioning to keep track of the different website product document versions.
So let's get to it
In Azure portal, search for and select Storage accounts.
Give your resource group a name.
Input storage account name and select Region.
To ensure high availability, for Redundancy select Read access Geo Redundant Storage.
Wait for deployment to complete, then Go to Resource.
To ensure information on public website is accessible go to the Settings section of the storage account, select the Configuration blade.
Ensure the Allow blob anonymous access setting is Enabled.
To create a blob storage container for the content of the website, go to the Data storage section of storage account, select the Containers blade.
Give container a name and select Create.
Customers should be able to view the images without being authenticated. Configure anonymous read access for the public container blobs.
Select your container.
On the Overview blade, select Change access level. Ensure the Public access level is set to Blob (anonymous read access for blobs only). Select OK.
Test by uploading a file to the public container. It could be an image or a text file. Select Upload.
Browse for files and select a file. Browse to a file of your choice.
Close the upload window, Refresh the page and ensure your file was uploaded.
On the Overview tab, copy the URL.
Paste the URL into a new browser tab.
Uploaded image file will display in the browser.
Now, it's time to configure soft delete. This is to ensure that documents can be restored if they’re deleted.
Go to the Overview blade of the storage account. In the Properties section, locate the Blob service section.
Select the Blob soft delete setting.
Ensure the Enable soft delete for blobs is checked and change the Keep deleted blobs for (in days) setting to 21.
Next step is to configure versioning. This is to keep track of the different website product document versions.
Go to the Overview blade of the storage account. In the Properties section, locate the Blob service section. Select the Versioning setting.
Ensure the Enable versioning for blobs checkbox is checked.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.