Skip to content

Commit 8003e1d

Browse files
Use fallback blob provider type.
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 549f638 commit 8003e1d

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerConfiguration.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ namespace Volo.Abp.BlobStoring;
77

88
public class BlobContainerConfiguration
99
{
10+
private Type? _providerType;
11+
1012
/// <summary>
1113
/// The provider to be used to store BLOBs of this container.
1214
/// </summary>
13-
public Type? ProviderType { get; set; }
15+
public Type? ProviderType
16+
{
17+
get => _providerType ?? _fallbackConfiguration?.ProviderType;
18+
set => _providerType = value;
19+
}
1420

1521
/// <summary>
1622
/// Indicates whether this container is multi-tenant or not.

framework/test/Volo.Abp.BlobStoring.Tests/Volo/Abp/BlobStoring/AbpBlobStoringOptions_Tests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public void Should_Fallback_To_Default_Configuration_If_Not_Specialized()
3333
{
3434
var config = _configurationProvider.Get<TestContainer3>();
3535
config.ProviderType.ShouldBe(typeof(FakeBlobProvider1));
36+
config.IsMultiTenant.ShouldBeFalse();
3637
config.GetConfigurationOrNull("TestConfigDefault").ShouldBe("TestValueDefault");
3738
}
3839
}

framework/test/Volo.Abp.BlobStoring.Tests/Volo/Abp/BlobStoring/AbpBlobStoringTestModule.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public override void ConfigureServices(ServiceConfigurationContext context)
3636
{
3737
container.SetConfiguration("TestConfig2", "TestValue2");
3838
container.ProviderType = typeof(FakeBlobProvider2);
39+
})
40+
.Configure<TestContainer3>(container =>
41+
{
42+
container.IsMultiTenant = false;
3943
});
4044
});
4145
}

0 commit comments

Comments
 (0)