Open Closed

DYNAMIC BLOB STORAGE OPTION #2805


User avatar
0
shijo created

This is a query regarding the dynamic blob storage option in abp.io. As per the current documentation, I have to add the provider options in the module class. Our requirement is, per tenant the provider options may vary. Is it possible to dynamically configure the provider options?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi @shijo ABP Framework doesn't provide a configuration for tenant-based blob provider resolution. There are a couple of ways to achieve tenant-based storage.

    1. You can try to use different containers across your tenants.
    2. You can manually resolve BlobProvider according to CurrentTenant via using IServiceProvider.
      var provider = serviceProvider.GetRequiredService<AzureBlobProvider>();
      // Or with type
      var provider = (BlobProviderBase) serviceProvider.GetRequiredService(typeof(AzureBlobProvider));
      
      // According to a rule:
      var provider = (BlobProviderBase) serviceProvider.GetRequiredService(providerMappingDictionary[CurrentTenant.Id]); //Dictionary returns type
      
      await provider.SaveAsync(...);
      
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.