docs/en/framework/infrastructure/blob-storing/minio.md
//[doc-seo]
{
"Description": "Learn how to configure the MinIO BLOB Storing Provider in your ABP Framework project for efficient object storage."
}
BLOB Storing Minio Provider can store BLOBs in MinIO Object storage.
Read the BLOB Storing document to understand how to use the BLOB storing system. This document only covers how to configure containers to use a Minio BLOB as the storage provider.
Use the ABP CLI to add Volo.Abp.BlobStoring.Minio NuGet package to your project:
.csproj file you want to add the Volo.Abp.BlobStoring.Minio package.abp add-package Volo.Abp.BlobStoring.Minio command.If you want to do it manually, install the Volo.Abp.BlobStoring.Minio NuGet package to your project and add [DependsOn(typeof(AbpBlobStoringMinioModule))] to the ABP module class inside your project.
Configuration is done in the ConfigureServices method of your module class, as explained in the BLOB Storing document.
Example: Configure to use the minio storage provider by default
Configure<AbpBlobStoringOptions>(options =>
{
options.Containers.ConfigureDefault(container =>
{
container.UseMinio(minio =>
{
minio.EndPoint = "your minio endPoint";
minio.AccessKey = "your minio accessKey";
minio.SecretKey = "your minio secretKey";
minio.BucketName = "your minio bucketName";
minio.PresignedGetExpirySeconds = 3600;
});
});
});
See the BLOB Storing document to learn how to configure this provider for a specific container.
BlobContainerName attribute (see the BLOB storing document).MinIO is the defacto standard for S3 compatibility, So MinIO has some rules for naming bucket. The following rules apply for naming MinIO buckets:
false,Chain to MinIO Client object to use https instead of http.false, If a bucket does not exist in minio, MinioBlobProvider will try to create it.7 * 24 * 3600, The expiration time of the pre-specified get url. The is valid within the range of 1 to 604800(corresponding to 7 days).Minio Blob Provider organizes BLOB name and implements some conventions. The full name of a BLOB is determined by the following rules by default:
host string if current tenant is null (or multi-tenancy is disabled for the container - see the BLOB Storing document to learn how to disable multi-tenancy for a container).tenants/<tenant-id> string if current tenant is not null.MinioBlobProvider is the main service that implements the Minio BLOB storage provider, if you want to override/replace it via dependency injection (don't replace IBlobProvider interface, but replace MinioBlobProvider class).IMinioBlobNameCalculator is used to calculate the full BLOB name (that is explained above). It is implemented by the DefaultMinioBlobNameCalculator by default.