Browse Source

feat(tencent-blob): 加入缺失的本地化文本.

pull/512/head
cKey 4 years ago
parent
commit
5eaedc3003
  1. 8
      aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN.Abp.BlobStoring.Tencent.csproj
  2. 17
      aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/AbpBlobStoringTencentCloudModule.cs
  3. 6
      aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/Localization/en.json
  4. 6
      aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/Localization/zh-Hans.json
  5. 3
      aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs

8
aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN.Abp.BlobStoring.Tencent.csproj

@ -9,6 +9,14 @@
<Description>腾讯云Oss对象存储Abp集成</Description> <Description>腾讯云Oss对象存储Abp集成</Description>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\BlobStoring\Tencent\Localization\*.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\BlobStoring\Tencent\Localization\*.json" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.BlobStoring" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.*" /> <PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.*" />

17
aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/AbpBlobStoringTencentCloudModule.cs

@ -1,6 +1,9 @@
using LINGYUN.Abp.Tencent; using LINGYUN.Abp.Tencent;
using LINGYUN.Abp.Tencent.Localization;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.BlobStoring.Tencent; namespace LINGYUN.Abp.BlobStoring.Tencent;
@ -9,4 +12,18 @@ namespace LINGYUN.Abp.BlobStoring.Tencent;
typeof(AbpTencentCloudModule))] typeof(AbpTencentCloudModule))]
public class AbpBlobStoringTencentCloudModule : AbpModule public class AbpBlobStoringTencentCloudModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpBlobStoringTencentCloudModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<TencentCloudResource>()
.AddVirtualJson("/LINGYUN/Abp/BlobStoring/Tencent/Localization");
});
}
} }

6
aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/Localization/en.json

@ -0,0 +1,6 @@
{
"culture": "en",
"texts": {
"TencentCloud:10101": "The Size of the uploaded file cannot exceed Tencent cloud storage limit {Size}!"
}
}

6
aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/Localization/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"TencentCloud:10101": "上传的文件大小不能超出腾讯云存储限制 {Size}!"
}
}

3
aspnet-core/modules/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs

@ -81,7 +81,8 @@ public class TencentCloudBlobProvider : BlobProviderBase, ITransientDependency
&& (maxStreamSize <= 0 && (maxStreamSize <= 0
|| maxStreamSize < args.BlobStream.Length / 1024 / 1024))) || maxStreamSize < args.BlobStream.Length / 1024 / 1024)))
{ {
throw new BusinessException("TencentCloud:10101"); throw new BusinessException("TencentCloud:10101")
.WithData("Size", maxStreamSizeString);
} }
var ossClient = await GetOssClientAsync(args); var ossClient = await GetOssClientAsync(args);

Loading…
Cancel
Save