docs/en/framework/infrastructure/blob-storing/memory.md
Memory Storage Provider is used to store BLOBs in the memory. This is mainly used for unit testing purposes.
Read the BLOB Storing document to understand how to use the BLOB storing system. This document only covers how to configure containers to use the memory.
Use the ABP CLI to add Volo.Abp.BlobStoring.Memory NuGet package to your project:
.csproj file you want to add the Volo.Abp.BlobStoring.Memory package.abp add-package Volo.Abp.BlobStoring.Memory command.If you want to do it manually, install the Volo.Abp.BlobStoring.Memory NuGet package to your project and add [DependsOn(typeof(AbpBlobStoringMemoryModule))] 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 Memory storage provider by default
Configure<AbpBlobStoringOptions>(options =>
{
options.Containers.ConfigureDefault(container =>
{
container.UseMemory();
});
});
UseMemory extension method is used to set the Memory Provider for a container.
See the BLOB Storing document to learn how to configure this provider for a specific container.