|
|
|
@ -38,6 +38,30 @@ abp框架对象存储提供者**IBlobProvider**的Oss管理模块实现 |
|
|
|
[DependsOn(typeof(AbpBlobStoringOssManagementModule))] |
|
|
|
public class YouProjectModule : AbpModule |
|
|
|
{ |
|
|
|
// other |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
Configure<AbpBlobStoringOptions>(options => |
|
|
|
{ |
|
|
|
services.ExecutePreConfiguredActions(options); |
|
|
|
// YouContainer use oss management |
|
|
|
options.Containers.Configure<YouContainer>((containerConfiguration) => |
|
|
|
{ |
|
|
|
containerConfiguration.UseOssManagement(config => |
|
|
|
{ |
|
|
|
config.Bucket = configuration[OssManagementBlobProviderConfigurationNames.Bucket]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// all container use oss management |
|
|
|
options.Containers.ConfigureAll((containerName, containerConfiguration) => |
|
|
|
{ |
|
|
|
// use oss management |
|
|
|
containerConfiguration.UseOssManagement(config => |
|
|
|
{ |
|
|
|
config.Bucket = configuration[OssManagementBlobProviderConfigurationNames.Bucket]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
|