ReferencePackages
PouryaKit.Storage.AzureBlob
The Host's file storage on Azure Blob Storage.
The Host's file storage on Azure Blob Storage. It supplies IFileStorage of PouryaKit.Storage on the Azure SDK, from options the Host validates, so Feature code stays on the contract and never names the SDK.
Install
dotnet add package PouryaKit.Storage.AzureBlob --prereleaseWhen to use it
- The application keeps its files on Azure Blob Storage.
- You test against Azurite.
It implements PouryaKit.Storage. A Host composes one provider, so it replaces PouryaKit.Storage.S3 rather than sitting beside it.
Quick start
Bind the provider's options from configuration, then register it in the Host, as the Kit's tests do:
builder.Services.Configure<PouryaKitAzureBlobStorageOptions>(
builder.Configuration.GetSection("PouryaKit:Storage:AzureBlob")
);
builder.Services.AddPouryaKitAzureBlobStorage();What you get
- The contract of
IFileStorageon the Azure SDK. - Options validated, so a Host with a wrong setting does not serve.
- Presigned links signed with the account key.
Presigned links need an account key: a connection string without one cannot sign them, and the options refuse it.