How to set Expiry Time for Azure Blob Storage URL.
In this article, we will learn how to set the expiry time for the Azure Blob Storage URL. We will use the Azure Storage SDK to generate the URL with the expiry time.
Create the new .env
file and add the following configuration.
ACCOUNT_NAME=xxxxxxx
ACCOUNT_KEY=xxxxxx
CONTAINER_NAME=testblob
BLOB_NAME=test.txt
DURATION=24h
Build the golang application.
make
Run the application.
./bin/azure-blob-storage