To make placeholders for data files in a Blob Storage account accessible both locally and remotely, you can use them similar to Dropbox or OneDrive. Here's a step-by-step guide:
-
Create a Blob Storage account: If you haven't already, create an Azure Blob Storage account. You can do this through the Azure portal, Azure CLI, or PowerShell.
-
Upload data files: Upload your data files to the Blob Storage account. You can use Azure portal, Azure CLI, or PowerShell for this as well.
-
Generate Shared Access Signature (SAS): To grant temporary access to your files, generate a Shared Access Signature (SAS). This can be done through the Azure portal, Azure CLI, or PowerShell.
az storage container generate-sas --name <container-name> --account-name <account-name> --permissions r --expiry <expiry-time> --output tsvReplace
<container-name>,<account-name>, and<expiry-time>with your container name, account name, and the desired expiry time for the SAS token, respectively. -
Access files locally: To access the files locally, mount the Blob Storage account as a network drive using a tool like Azure Storage Explorer or Azure.storage.file.
-
Access files remotely: To access the files remotely, include the SAS token in the URL when requesting the file. The URL will look something like this:
https://<account-name>.blob.core.windows.net/<container-name>/<file-name>?<SAS-token> -
Use with Dropbox or OneDrive-like functionality: You can use this setup to create a similar experience to Dropbox or OneDrive. For example, you can create a script that generates a unique SAS token for each file and provides a link for downloading or editing the file.
References: