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)
- .NET 8 SDK
- Azure account with Blob Storage access
- (Optional) Azure Key Vault for secrets
git clone https://github.com/tomblanchard312/AzureBlobStorageAPI.git
cd AzureBlobStorageAPI/NetCoreAzureBlobServiceAPI
dotnet build
dotnet run- Blob Storage: Set your Azure connection string in
appsettings.json. For local dev, use Azurite (seeazurite/folder). - Key Vault: Uncomment Key Vault code and set URI in
appsettings.jsonfor secure secrets. - Allowed Extensions: Update
permittedExtensionsinControllers/FileManagerController.csto restrict file types.
POST /api/FileManager/upload
file: File to uploadclientId,clientSecret: Credentials → Returns: Blob URL
GET /api/FileManager/list
clientId,clientSecret: Credentials
→ Returns: List of blobs (name, date)
GET /api/FileManager/download
clientId,clientSecret: CredentialsblobName: Blob to download
→ Returns: File download
- Client Validation: Use
clientId/clientSecret(optionally via Key Vault) - Data Protection: DPAPI and Key Vault supported for encryption (optional)
Contributions are welcome! Please open issues or submit pull requests for improvements.