Skip to content

tomblanchard312/AzureBlobStorageAPI

Repository files navigation

Azure Blob Storage API

.NET Azure Azurite Key Vault License: MIT

Build Status Open Issues License


A modern .NET Core Web API for uploading, listing, and downloading files to Azure Blob Storage.

Features:

  • Upload, list, and download files via REST endpoints
  • Supports Azure Blob Storage and local Azurite emulator
  • Optional Azure Key Vault integration for secrets and client validation
  • Secure file extension validation and client authentication
  • Container-ready (Dockerfile included)

Table of Contents

Prerequisites

  • .NET 8 SDK
  • Azure account with Blob Storage access
  • (Optional) Azure Key Vault for secrets

Getting Started

git clone https://github.com/tomblanchard312/AzureBlobStorageAPI.git
cd AzureBlobStorageAPI/NetCoreAzureBlobServiceAPI
dotnet build
dotnet run

Configuration

  • Blob Storage: Set your Azure connection string in appsettings.json. For local dev, use Azurite (see azurite/ folder).
  • Key Vault: Uncomment Key Vault code and set URI in appsettings.json for secure secrets.
  • Allowed Extensions: Update permittedExtensions in Controllers/FileManagerController.cs to restrict file types.

API Usage

Upload File

POST /api/FileManager/upload

  • file: File to upload
  • clientId, clientSecret: Credentials → Returns: Blob URL

List Blobs

GET /api/FileManager/list

  • clientId, clientSecret: Credentials

→ Returns: List of blobs (name, date)

Download Blob

GET /api/FileManager/download

  • clientId, clientSecret: Credentials
  • blobName: Blob to download

→ Returns: File download

Security

  • Client Validation: Use clientId/clientSecret (optionally via Key Vault)
  • Data Protection: DPAPI and Key Vault supported for encryption (optional)

Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements.

About

This performs functions on an azure blob, such as upload, list, and read.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •