Browse Source

Merge pull request #1347 from colinin/fix-long-object

fix(blobstoring): fix the issue of downloading large objects
pull/1351/head
yx lin 5 months ago
committed by GitHub
parent
commit
6500883c1d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN.Abp.BlobStoring.Tencent.csproj
  2. 3
      aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/AbpBlobStoringTencentCloudModule.cs
  3. 5
      aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/BlobStoringTencentConsts.cs
  4. 17
      aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs
  5. 12
      aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/Microsoft/Extensions/DependencyInjection/BlobStoringTencentHttpClientFactoryServiceCollectionExtensions.cs
  6. 11
      aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/System/Net/Http/BlobStoringTencentHttpClientFactoryExtenssions.cs
  7. 4
      aspnet-core/framework/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs
  8. 2
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssObject.cs
  9. 1
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/LINGYUN.Abp.OssManagement.Minio.csproj
  10. 7
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/LINGYUN/Abp/OssManagement/Minio/AbpOssManagementMinioModule.cs
  11. 36
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/LINGYUN/Abp/OssManagement/Minio/MinioOssContainer.cs
  12. 18
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/Microsoft/Extensions/DependencyInjection/MinioHttpClientFactoryServiceCollectionExtensions.cs
  13. 10
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Nexus/LINGYUN/Abp/OssManagement/Nexus/NexusOssContainer.cs
  14. 18
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainer.cs
  15. 6
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainerFactory.cs

7
aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN.Abp.BlobStoring.Tencent.csproj

@ -15,20 +15,21 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="LINGYUN\Abp\BlobStoring\Tencent\Localization\*.json" /> <None Remove="LINGYUN\Abp\BlobStoring\Tencent\Localization\*.json" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\BlobStoring\Tencent\Localization\*.json" /> <EmbeddedResource Include="LINGYUN\Abp\BlobStoring\Tencent\Localization\*.json" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring" /> <PackageReference Include="Volo.Abp.BlobStoring" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" /> <PackageReference Include="Tencent.QCloud.Cos.Sdk" />
<PackageReference Include="Microsoft.Extensions.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.Tencent\LINGYUN.Abp.Tencent.csproj" /> <ProjectReference Include="..\LINGYUN.Abp.Tencent\LINGYUN.Abp.Tencent.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

3
aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/AbpBlobStoringTencentCloudModule.cs

@ -1,5 +1,6 @@
using LINGYUN.Abp.Tencent; using LINGYUN.Abp.Tencent;
using LINGYUN.Abp.Tencent.Localization; using LINGYUN.Abp.Tencent.Localization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
@ -25,5 +26,7 @@ public class AbpBlobStoringTencentCloudModule : AbpModule
.Get<TencentCloudResource>() .Get<TencentCloudResource>()
.AddVirtualJson("/LINGYUN/Abp/BlobStoring/Tencent/Localization"); .AddVirtualJson("/LINGYUN/Abp/BlobStoring/Tencent/Localization");
}); });
context.Services.AddTenantOssClient();
} }
} }

5
aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/BlobStoringTencentConsts.cs

@ -0,0 +1,5 @@
namespace LINGYUN.Abp.BlobStoring.Tencent;
internal static class BlobStoringTencentConsts
{
public const string HttpClient = "BlobStoring.Tencent";
}

17
aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/LINGYUN/Abp/BlobStoring/Tencent/TencentCloudBlobProvider.cs

@ -6,6 +6,7 @@ using LINGYUN.Abp.Tencent.Features;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
@ -19,15 +20,18 @@ public class TencentCloudBlobProvider : BlobProviderBase, ITransientDependency
{ {
protected IFeatureChecker FeatureChecker { get; } protected IFeatureChecker FeatureChecker { get; }
protected ICosClientFactory CosClientFactory { get; } protected ICosClientFactory CosClientFactory { get; }
protected IHttpClientFactory HttpClientFactory { get; }
protected ITencentBlobNameCalculator TencentBlobNameCalculator { get; } protected ITencentBlobNameCalculator TencentBlobNameCalculator { get; }
public TencentCloudBlobProvider( public TencentCloudBlobProvider(
IFeatureChecker featureChecker, IFeatureChecker featureChecker,
ICosClientFactory cosClientFactory, ICosClientFactory cosClientFactory,
IHttpClientFactory httpClientFactory,
ITencentBlobNameCalculator tencentBlobNameCalculator) ITencentBlobNameCalculator tencentBlobNameCalculator)
{ {
FeatureChecker = featureChecker; FeatureChecker = featureChecker;
CosClientFactory = cosClientFactory; CosClientFactory = cosClientFactory;
HttpClientFactory = httpClientFactory;
TencentBlobNameCalculator = tencentBlobNameCalculator; TencentBlobNameCalculator = tencentBlobNameCalculator;
} }
@ -65,12 +69,13 @@ public class TencentCloudBlobProvider : BlobProviderBase, ITransientDependency
// TODO: 未经验证 // TODO: 未经验证
var request = new GetObjectBytesRequest(GetBucketName(args), blobName); var ossDownloadUrl = ossClient.GetObjectUrl(GetBucketName(args), blobName);
var ossObject = ossClient.GetObject(request);
var memoryStream = new MemoryStream(); var client = HttpClientFactory.CreateTenantOssClient();
await memoryStream.WriteAsync(ossObject.content, 0, ossObject.content.Length);
memoryStream.Seek(0, SeekOrigin.Begin); var ossContent = await client.GetStreamAsync(ossDownloadUrl);
return memoryStream;
return ossContent;
} }
public override async Task SaveAsync(BlobProviderSaveArgs args) public override async Task SaveAsync(BlobProviderSaveArgs args)

12
aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/Microsoft/Extensions/DependencyInjection/BlobStoringTencentHttpClientFactoryServiceCollectionExtensions.cs

@ -0,0 +1,12 @@
using LINGYUN.Abp.BlobStoring.Tencent;
namespace Microsoft.Extensions.DependencyInjection;
internal static class BlobStoringTencentHttpClientFactoryServiceCollectionExtensions
{
public static IServiceCollection AddTenantOssClient(this IServiceCollection services)
{
services.AddHttpClient(BlobStoringTencentConsts.HttpClient);
return services;
}
}

11
aspnet-core/framework/cloud-tencent/LINGYUN.Abp.BlobStoring.Tencent/System/Net/Http/BlobStoringTencentHttpClientFactoryExtenssions.cs

@ -0,0 +1,11 @@
using LINGYUN.Abp.BlobStoring.Tencent;
namespace System.Net.Http;
public static class BlobStoringTencentHttpClientFactoryExtenssions
{
public static HttpClient CreateTenantOssClient(
this IHttpClientFactory httpClientFactory)
{
return httpClientFactory.CreateClient(BlobStoringTencentConsts.HttpClient); ;
}
}

4
aspnet-core/framework/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs

@ -56,9 +56,7 @@ public class AliyunBlobProvider : BlobProviderBase, ITransientDependency
} }
var ossObject = ossClient.GetObject(GetBucketName(args), blobName); var ossObject = ossClient.GetObject(GetBucketName(args), blobName);
var memoryStream = new MemoryStream(); return ossObject.Content;
await ossObject.Content.CopyToAsync(memoryStream);
return memoryStream;
} }
public override async Task SaveAsync(BlobProviderSaveArgs args) public override async Task SaveAsync(BlobProviderSaveArgs args)

2
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssObject.cs

@ -44,7 +44,7 @@ public class OssObject
public void SetContent(Stream stream) public void SetContent(Stream stream)
{ {
_content = stream; _content = stream;
if (!_content.IsNullOrEmpty()) if (!_content.IsNullOrEmpty() && _content.CanSeek && _content.Position != 0)
{ {
_content.Seek(0, SeekOrigin.Begin); _content.Seek(0, SeekOrigin.Begin);
} }

1
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/LINGYUN.Abp.OssManagement.Minio.csproj

@ -15,6 +15,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Minio" /> <PackageReference Include="Volo.Abp.BlobStoring.Minio" />
<PackageReference Include="Microsoft.Extensions.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

7
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/LINGYUN/Abp/OssManagement/Minio/AbpOssManagementMinioModule.cs

@ -1,4 +1,5 @@
using Volo.Abp.BlobStoring.Minio; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.BlobStoring.Minio;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
namespace LINGYUN.Abp.OssManagement.Minio; namespace LINGYUN.Abp.OssManagement.Minio;
@ -8,4 +9,8 @@ namespace LINGYUN.Abp.OssManagement.Minio;
typeof(AbpOssManagementDomainModule))] typeof(AbpOssManagementDomainModule))]
public class AbpOssManagementMinioModule : AbpModule public class AbpOssManagementMinioModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddMinioHttpClient();
}
} }

36
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/LINGYUN/Abp/OssManagement/Minio/MinioOssContainer.cs

@ -11,6 +11,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core; using System.Linq.Dynamic.Core;
using System.Net.Http;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
@ -29,6 +30,7 @@ public class MinioOssContainer : OssContainerBase, IOssObjectExpireor
protected IMinioBlobNameCalculator MinioBlobNameCalculator { get; } protected IMinioBlobNameCalculator MinioBlobNameCalculator { get; }
protected IBlobNormalizeNamingService BlobNormalizeNamingService { get; } protected IBlobNormalizeNamingService BlobNormalizeNamingService { get; }
protected IBlobContainerConfigurationProvider ConfigurationProvider { get; } protected IBlobContainerConfigurationProvider ConfigurationProvider { get; }
protected IHttpClientFactory HttpClientFactory { get; }
protected IClock Clock { get; } protected IClock Clock { get; }
protected ICurrentTenant CurrentTenant { get; } protected ICurrentTenant CurrentTenant { get; }
@ -42,12 +44,14 @@ public class MinioOssContainer : OssContainerBase, IOssObjectExpireor
IBlobNormalizeNamingService blobNormalizeNamingService, IBlobNormalizeNamingService blobNormalizeNamingService,
IBlobContainerConfigurationProvider configurationProvider, IBlobContainerConfigurationProvider configurationProvider,
IServiceScopeFactory serviceScopeFactory, IServiceScopeFactory serviceScopeFactory,
IHttpClientFactory httpClientFactory,
IOptions<AbpOssManagementOptions> options) IOptions<AbpOssManagementOptions> options)
: base(options, serviceScopeFactory) : base(options, serviceScopeFactory)
{ {
Clock = clock; Clock = clock;
Logger = logger; Logger = logger;
CurrentTenant = currentTenant; CurrentTenant = currentTenant;
HttpClientFactory = httpClientFactory;
MinioBlobNameCalculator = minioBlobNameCalculator; MinioBlobNameCalculator = minioBlobNameCalculator;
BlobNormalizeNamingService = blobNormalizeNamingService; BlobNormalizeNamingService = blobNormalizeNamingService;
ConfigurationProvider = configurationProvider; ConfigurationProvider = configurationProvider;
@ -440,23 +444,10 @@ public class MinioOssContainer : OssContainerBase, IOssObjectExpireor
throw new BusinessException(code: OssManagementErrorCodes.ObjectNotFound); throw new BusinessException(code: OssManagementErrorCodes.ObjectNotFound);
} }
var memoryStream = new MemoryStream(); var getObjectResult = await client.StatObjectAsync(
var getObjectArgs = new GetObjectArgs() new StatObjectArgs()
.WithBucket(bucket) .WithBucket(bucket)
.WithObject(objectName) .WithObject(objectName));
.WithCallbackStream((stream) =>
{
if (stream != null)
{
stream.CopyTo(memoryStream);
memoryStream.Seek(0, SeekOrigin.Begin);
}
else
{
memoryStream = null;
}
});
var getObjectResult = await client.GetObjectAsync(getObjectArgs);
var ossObject = new OssObject( var ossObject = new OssObject(
!objectPath.IsNullOrWhiteSpace() !objectPath.IsNullOrWhiteSpace()
@ -465,7 +456,7 @@ public class MinioOssContainer : OssContainerBase, IOssObjectExpireor
request.Path, request.Path,
getObjectResult.ETag, getObjectResult.ETag,
getObjectResult.LastModified, getObjectResult.LastModified,
memoryStream.Length, getObjectResult.Size,
getObjectResult.LastModified, getObjectResult.LastModified,
getObjectResult.MetaData, getObjectResult.MetaData,
getObjectResult.ObjectName.EndsWith("/")) getObjectResult.ObjectName.EndsWith("/"))
@ -473,9 +464,16 @@ public class MinioOssContainer : OssContainerBase, IOssObjectExpireor
FullName = getObjectResult.ObjectName.Replace(prefixPath, "") FullName = getObjectResult.ObjectName.Replace(prefixPath, "")
}; };
if (memoryStream.Length > 0) if (getObjectResult.Size > 0)
{ {
ossObject.SetContent(memoryStream); var objectUrl = await client.PresignedGetObjectAsync(
new PresignedGetObjectArgs()
.WithBucket(bucket)
.WithObject(objectName)
.WithExpiry(3600));
var httpClient = HttpClientFactory.CreateMinioHttpClient();
ossObject.SetContent(await httpClient.GetStreamAsync(objectUrl));
} }
return ossObject; return ossObject;

18
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Minio/Microsoft/Extensions/DependencyInjection/MinioHttpClientFactoryServiceCollectionExtensions.cs

@ -0,0 +1,18 @@
using System.Net.Http;
namespace Microsoft.Extensions.DependencyInjection;
internal static class MinioHttpClientFactoryServiceCollectionExtensions
{
private const string HttpClientName = "__AbpMinioHttpClient";
public static IServiceCollection AddMinioHttpClient(this IServiceCollection services)
{
services.AddHttpClient(HttpClientName);
return services;
}
public static HttpClient CreateMinioHttpClient(this IHttpClientFactory httpClientFactory)
{
return httpClientFactory.CreateClient(HttpClientName);
}
}

10
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Nexus/LINGYUN/Abp/OssManagement/Nexus/NexusOssContainer.cs

@ -301,7 +301,7 @@ internal class NexusOssContainer : OssContainerBase, IOssObjectExpireor
} }
} }
return new OssObject( var ossObject = new OssObject(
blobName, blobName,
blobPath, blobPath,
checksum?.GetOrDefault("md5")?.ToString(), checksum?.GetOrDefault("md5")?.ToString(),
@ -309,7 +309,13 @@ internal class NexusOssContainer : OssContainerBase, IOssObjectExpireor
coreUIResponse.Result.Data.Size, coreUIResponse.Result.Data.Size,
coreUIResponse.Result.Data.BlobUpdated, coreUIResponse.Result.Data.BlobUpdated,
metadata metadata
); );
var ossContent = await NexusAssetManager.GetContentOrNullAsync(nexusAssetItem);
ossObject.SetContent(ossContent);
return ossObject;
} }
protected virtual NexusBlobProviderConfiguration GetNexusConfiguration() protected virtual NexusBlobProviderConfiguration GetNexusConfiguration()

18
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainer.cs

@ -9,6 +9,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
@ -24,10 +25,12 @@ internal class TencentOssContainer : OssContainerBase, IOssObjectExpireor
protected IClock Clock { get; } protected IClock Clock { get; }
protected ICurrentTenant CurrentTenant { get; } protected ICurrentTenant CurrentTenant { get; }
protected ICosClientFactory CosClientFactory { get; } protected ICosClientFactory CosClientFactory { get; }
protected IHttpClientFactory HttpClientFactory { get; }
public TencentOssContainer( public TencentOssContainer(
IClock clock, IClock clock,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
ICosClientFactory cosClientFactory, ICosClientFactory cosClientFactory,
IHttpClientFactory httpClientFactory,
IServiceScopeFactory serviceScopeFactory, IServiceScopeFactory serviceScopeFactory,
IOptions<AbpOssManagementOptions> options) IOptions<AbpOssManagementOptions> options)
: base(options, serviceScopeFactory) : base(options, serviceScopeFactory)
@ -35,6 +38,7 @@ internal class TencentOssContainer : OssContainerBase, IOssObjectExpireor
Clock = clock; Clock = clock;
CurrentTenant = currentTenant; CurrentTenant = currentTenant;
CosClientFactory = cosClientFactory; CosClientFactory = cosClientFactory;
HttpClientFactory = httpClientFactory;
} }
public async override Task BulkDeleteObjectsAsync(BulkDeleteObjectRequest request) public async override Task BulkDeleteObjectsAsync(BulkDeleteObjectRequest request)
{ {
@ -386,6 +390,11 @@ internal class TencentOssContainer : OssContainerBase, IOssObjectExpireor
getObjectRequest.SetQueryParameter(request.Process, null); getObjectRequest.SetQueryParameter(request.Process, null);
} }
var objectResult = ossClient.GetObject(getObjectRequest); var objectResult = ossClient.GetObject(getObjectRequest);
var objectDownloadUrl = ossClient.GetObjectUrl(request.Bucket, objectName);
var client = HttpClientFactory.CreateTenantOssClient();
var objectContent = await client.GetStreamAsync(objectDownloadUrl);
var ossObject = new OssObject( var ossObject = new OssObject(
!objectPath.IsNullOrWhiteSpace() !objectPath.IsNullOrWhiteSpace()
? objectResult.Key.Replace(objectPath, "") ? objectResult.Key.Replace(objectPath, "")
@ -393,7 +402,7 @@ internal class TencentOssContainer : OssContainerBase, IOssObjectExpireor
request.Path, request.Path,
objectResult.eTag, objectResult.eTag,
null, null,
objectResult.content.Length, objectContent.Length,
null, null,
new Dictionary<string, string>(), new Dictionary<string, string>(),
objectResult.Key.EndsWith("/")) objectResult.Key.EndsWith("/"))
@ -401,12 +410,9 @@ internal class TencentOssContainer : OssContainerBase, IOssObjectExpireor
FullName = objectResult.Key FullName = objectResult.Key
}; };
if (objectResult.content.Length > 0) if (objectContent.Length > 0)
{ {
var memoryStream = new MemoryStream(); ossObject.SetContent(objectContent);
await memoryStream.WriteAsync(objectResult.content, 0, objectResult.content.Length);
memoryStream.Seek(0, SeekOrigin.Begin);
ossObject.SetContent(memoryStream);
} }
return ossObject; return ossObject;

6
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Tencent/LINGYUN/Abp/OssManagement/Tencent/TencentOssContainerFactory.cs

@ -1,6 +1,7 @@
using LINGYUN.Abp.BlobStoring.Tencent; using LINGYUN.Abp.BlobStoring.Tencent;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using System.Net.Http;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.Timing; using Volo.Abp.Timing;
@ -11,7 +12,7 @@ public class TencentOssContainerFactory : IOssContainerFactory
protected IClock Clock { get; } protected IClock Clock { get; }
protected ICurrentTenant CurrentTenant { get; } protected ICurrentTenant CurrentTenant { get; }
protected ICosClientFactory CosClientFactory { get; } protected ICosClientFactory CosClientFactory { get; }
protected IHttpClientFactory HttpClientFactory { get; }
protected IServiceScopeFactory ServiceScopeFactory { get; } protected IServiceScopeFactory ServiceScopeFactory { get; }
protected IOptions<AbpOssManagementOptions> Options { get; } protected IOptions<AbpOssManagementOptions> Options { get; }
@ -19,12 +20,14 @@ public class TencentOssContainerFactory : IOssContainerFactory
IClock clock, IClock clock,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
ICosClientFactory cosClientFactory, ICosClientFactory cosClientFactory,
IHttpClientFactory httpClientFactory,
IServiceScopeFactory serviceScopeFactory, IServiceScopeFactory serviceScopeFactory,
IOptions<AbpOssManagementOptions> options) IOptions<AbpOssManagementOptions> options)
{ {
Clock = clock; Clock = clock;
CurrentTenant = currentTenant; CurrentTenant = currentTenant;
CosClientFactory = cosClientFactory; CosClientFactory = cosClientFactory;
HttpClientFactory = httpClientFactory;
Options = options; Options = options;
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;
} }
@ -35,6 +38,7 @@ public class TencentOssContainerFactory : IOssContainerFactory
Clock, Clock,
CurrentTenant, CurrentTenant,
CosClientFactory, CosClientFactory,
HttpClientFactory,
ServiceScopeFactory, ServiceScopeFactory,
Options); Options);
} }

Loading…
Cancel
Save