mirror of https://github.com/abpframework/abp.git
Browse Source
- Build an object download link using 'PresignedGetObjectAsync' and directly download the network stream through 'HttpClient'. - ` MinioBlobProviderConfiguration ` add a ` PresignedGetExpirySeconds ` configuration items, used to configure expiration time component link, the default is 7 days.pull/23968/head
7 changed files with 54 additions and 19 deletions
@ -0,0 +1,18 @@ |
|||
using System.Net.Http; |
|||
|
|||
namespace Microsoft.Extensions.DependencyInjection; |
|||
internal static class MinioHttpClientFactoryServiceCollectionExtensions |
|||
{ |
|||
private const string HttpClientName = "__MinioApiClient"; |
|||
public static IServiceCollection AddMinioHttpClient(this IServiceCollection services) |
|||
{ |
|||
services.AddHttpClient(HttpClientName); |
|||
|
|||
return services; |
|||
} |
|||
|
|||
public static HttpClient CreateMinioHttpClient(this IHttpClientFactory httpClientFactory) |
|||
{ |
|||
return httpClientFactory.CreateClient(HttpClientName); |
|||
} |
|||
} |
|||
@ -1,9 +1,13 @@ |
|||
using Volo.Abp.Modularity; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.BlobStoring.Minio; |
|||
|
|||
[DependsOn(typeof(AbpBlobStoringModule))] |
|||
public class AbpBlobStoringMinioModule : AbpModule |
|||
{ |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddMinioHttpClient(); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue