Open Closed

How can I use two Blob databases? #8106


User avatar
0
yunusemrecaglar created
  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

I want to use two blobs within the project. One should connect directly to the database, and the other should be set up as a file system. How can I do this?


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can do it by configuring File Container

    https://abp.io/docs/latest/framework/infrastructure/blob-storing

    Configure<AbpBlobStoringOptions>(options =>
    {
        options.Containers.Configure<UseFileProviderContainer>(container =>
        {
            container.UseFileSystem(fileSystem =>
            {
                fileSystem.BasePath = "C:\\my-files";
            });
        });
        
        options.Containers.Configure<UseDbProviderContainer>(container =>
        {
            container.UseDatabase();
        });
    });
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15