DEV Community

Sandra Brown
Sandra Brown

Posted on

Azure Blob Storage: How to Upload, Access, and Manage Files

When it comes to storing unstructured data in the cloud, Azure Blob Storage is one of the go-to solutions for developers, IT teams, and businesses. Whether you're hosting images, backups, documents, or video files, Blob Storage offers a secure, scalable, and affordable way to manage files at scale.

Let's see how to upload, access, and manage files in Azure Blob Storage using natural language and easy-to-follow steps—ideal for beginners or anyone looking to get hands-on with Azure.

What is Azure Blob Storage?

Azure Blob Storage is part of Microsoft Azure’s object storage solution. Blob stands for Binary Large Object, and it’s perfect for storing large amounts of unstructured data like:

Media files (images, videos, audio)
Logs and backups
Documents and archives
Big data for analytics

Blob storage is organized into containers, which are like folders for your blobs (files).

Getting Started with Azure Blob Storage

Before we jump into the hands-on stuff, make sure you have:

An active Azure account
Azure CLI or Azure Portal access

Let’s break it down step-by-step.

Step 1: Create a Storage Account

  1. Log into the Azure Portal.
  2. Search for Storage Accounts and click + Create.
  3. Fill in basic details like:
  • Subscription & Resource Group
  • Storage account name (must be globally unique)
  • Region (choose one close to your users)
  • Performance (Standard is fine for most cases)
    1. Click Review + Create, then create.

Once deployed, go to your new storage account.

Step 2: Create a Blob Container

  1. In the storage account dashboard, click Containers under the Data storage section.
  2. Click + Container.
  3. Name your container (e.g., images, videos, backups).
  4. Choose Public Access Level:
  • Private (default): Only accessible via your app/code.
  • Blob: Public read access to blobs only.
    1. Click Create.

Now your container is ready to accept files.

Step 3: Upload Files

You can upload files in multiple ways: through the Azure Portal, Azure CLI, or programmatically (like using Python or .NET SDK).

Option 1: Azure Portal

  1. Go to your container.
  2. Click Upload.
  3. Select files from your computer.
  4. Click Upload and they’ll appear in the list.

Option 2: Azure CLI

Run this command:

az storage blob upload \
  --account-name <your-storage-account> \
  --container-name <your-container-name> \
  --name <blob-name> \
  --file <local-file-path> \
  --auth-mode login
Enter fullscreen mode Exit fullscreen mode

Replace the placeholders accordingly.

Step 4: Access Files in Blob Storage

Public Blob Access

If your container is public, you can access any file with a direct URL:

https://<storage-account>.blob.core.windows.net/<container>/<blob-name>
Enter fullscreen mode Exit fullscreen mode

Private Access (Using SAS Token)

For private containers, use Shared Access Signatures (SAS) to generate temporary URLs:

From the Azure Portal:

  1. Click the file (blob).
  2. Click Generate SAS.
  3. Set expiry time and permissions.
  4. Copy the SAS URL to share with others securely.

Step 5: Manage Files in Blob Storage

Azure offers powerful file management options:

  • Delete Files: You can delete blobs manually or using lifecycle rules.
  • Folders: Technically, there are no “folders,” but you can simulate them using names (e.g., images/cat.jpg).
  • Metadata: Add custom metadata to blobs for search and categorization.
  • Lifecycle Management: Set rules to delete or archive files after X days.
  • Versioning: Enable blob versioning to track and restore previous versions of files.

Common Use Cases

  • Web App Hosting: Store and serve static files like CSS, JS, and images.
  • Backup & Archive: Use cool or archive tier for long-term storage at a lower cost.
  • Big Data: Feed data into Azure Data Lake or analytics pipelines.
  • Media Streaming: Host large videos or podcasts with public access.

  • Secure your files with Azure Active Directory (AD) or role-based access control (RBAC).

Conclusion

Azure Blob Storage is flexible, cost-efficient, and beginner-friendly. Whether you're storing a few files or building a complex data pipeline, it's a reliable foundation for cloud storage in your applications.

Want to take your Azure skills further? Check out the Microsoft Azure Developer Course.It has real-world projects—including blob storage, web apps, functions, and more.
Happy building!

Top comments (0)