Browse Source

feat(oss): update how to use README.md

pull/439/head
cKey 4 years ago
parent
commit
e4bcaadb84
  1. 26
      aspnet-core/modules/oss-management/LINGYUN.Abp.BlobStoring.OssManagement/README.md

26
aspnet-core/modules/oss-management/LINGYUN.Abp.BlobStoring.OssManagement/README.md

@ -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];
});
});
});
}
}
```

Loading…
Cancel
Save