Browse Source

fix: Fix the client proxy of the BlobManagement module

pull/1549/head
colin 2 weeks ago
parent
commit
eab022871d
  1. 34
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/BlobClientProxy.Generated.cs
  2. 15
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Dtos/BlobDownloadByIdInput.cs
  3. 2
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Dtos/BlobDownloadByNameInput.cs
  4. 2
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Dtos/BlobDto.cs
  5. 10
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/IBlobAppService.cs
  6. 4
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/IPrivateBlobAppService.cs
  7. 4
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/IPublicBlobAppService.cs
  8. 4
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Integration/BlobIntegrationClientProxy.Generated.cs
  9. 2
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Integration/IBlobIntegrationService.cs
  10. 8
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/PrivateBlobClientProxy.Generated.cs
  11. 8
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/PublicBlobClientProxy.Generated.cs
  12. 10265
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/blob-management-generate-proxy.json
  13. 2
      aspnet-core/modules/blob-management/LINGYUN.Abp.BlobStoring.BlobManagement/LINGYUN/Abp/BlobStoring/BlobManagement/BlobManagementBlobProvider.cs
  14. 4
      common.props

34
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/BlobClientProxy.Generated.cs

@ -51,17 +51,25 @@ public partial class BlobClientProxy : ClientProxyBase<IBlobAppService>, IBlobAp
});
}
public virtual async Task<IRemoteStreamContent> GetContentAsync(Guid id)
public virtual async Task<IRemoteStreamContent> DownloadAsync(BlobDownloadByIdInput input)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
{ typeof(BlobDownloadByIdInput), input }
});
}
public virtual async Task<IRemoteStreamContent> GetContentByNameAsync(BlobDownloadByNameInput input)
public virtual async Task<IRemoteStreamContent> PreviewAsync(BlobDownloadByIdInput input)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentByNameAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(PreviewAsync), new ClientProxyRequestTypeValue
{
{ typeof(BlobDownloadByIdInput), input }
});
}
public virtual async Task<IRemoteStreamContent> DownloadByNameAsync(BlobDownloadByNameInput input)
{
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadByNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(BlobDownloadByNameInput), input }
});
@ -82,4 +90,20 @@ public partial class BlobClientProxy : ClientProxyBase<IBlobAppService>, IBlobAp
{ typeof(BlobGetPagedListInput), input }
});
}
public virtual async Task<string> GenerateDownloadUrlAsync(Guid id)
{
return await RequestAsync<string>(nameof(GenerateDownloadUrlAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<string> GeneratePreviewUrlAsync(Guid id)
{
return await RequestAsync<string>(nameof(GeneratePreviewUrlAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
}

15
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Dtos/BlobDownloadByIdInput.cs

@ -0,0 +1,15 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.BlobManagement.Dtos;
using System;
using System.Collections.Generic;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.ObjectExtending;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.BlobManagement.Dtos;
public class BlobDownloadByIdInput
{
public string Key { get; set; }
}

2
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Dtos/BlobDownloadByNameInput.cs

@ -11,6 +11,8 @@ namespace LINGYUN.Abp.BlobManagement.Dtos;
public class BlobDownloadByNameInput
{
public Guid? TenantId { get; set; }
public string ContainerName { get; set; }
public string BlobName { get; set; }

2
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Dtos/BlobDto.cs

@ -14,7 +14,7 @@ public class BlobDto : ExtensibleAuditedEntityDto<Guid>
{
public string Name { get; set; }
public string Path { get; set; }
public string FullName { get; set; }
public BlobType Type { get; set; }

10
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/IBlobAppService.cs

@ -22,9 +22,15 @@ public interface IBlobAppService : IApplicationService
Task DeleteAsync(Guid id);
Task<IRemoteStreamContent> GetContentAsync(Guid id);
Task<string> GeneratePreviewUrlAsync(Guid id);
Task<IRemoteStreamContent> GetContentByNameAsync(BlobDownloadByNameInput input);
Task<string> GenerateDownloadUrlAsync(Guid id);
Task<IRemoteStreamContent> DownloadAsync(BlobDownloadByIdInput input);
Task<IRemoteStreamContent> PreviewAsync(BlobDownloadByIdInput input);
Task<IRemoteStreamContent> DownloadByNameAsync(BlobDownloadByNameInput input);
Task<BlobDto> GetAsync(Guid id);

4
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/IPrivateBlobAppService.cs

@ -22,9 +22,9 @@ public interface IPrivateBlobAppService : IApplicationService
Task DeleteAsync(Guid id);
Task<IRemoteStreamContent> GetContentAsync(Guid id);
Task<IRemoteStreamContent> DownloadAsync(Guid id);
Task<IRemoteStreamContent> GetContentByNameAsync(string name);
Task<IRemoteStreamContent> DownloadByNameAsync(string name);
Task<BlobDto> GetAsync(Guid id);

4
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/IPublicBlobAppService.cs

@ -14,9 +14,9 @@ namespace LINGYUN.Abp.BlobManagement;
public interface IPublicBlobAppService : IApplicationService
{
Task<IRemoteStreamContent> GetContentAsync(Guid id);
Task<IRemoteStreamContent> DownloadAsync(Guid id);
Task<IRemoteStreamContent> GetContentByNameAsync(string name);
Task<IRemoteStreamContent> DownloadByNameAsync(string name);
Task<BlobDto> GetAsync(Guid id);

4
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Integration/BlobIntegrationClientProxy.Generated.cs

@ -45,9 +45,9 @@ public partial class BlobIntegrationClientProxy : ClientProxyBase<IBlobIntegrati
});
}
public virtual async Task<IRemoteStreamContent> GetContentAsync(BlobFileGetByNameIntegrationDto input)
public virtual async Task<IRemoteStreamContent> DownloadAsync(BlobFileGetByNameIntegrationDto input)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadAsync), new ClientProxyRequestTypeValue
{
{ typeof(BlobFileGetByNameIntegrationDto), input }
});

2
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/Integration/IBlobIntegrationService.cs

@ -21,5 +21,5 @@ public interface IBlobIntegrationService : IApplicationService
Task<bool> ExistsAsync(BlobFileGetByNameIntegrationDto input);
Task<IRemoteStreamContent> GetContentAsync(BlobFileGetByNameIntegrationDto input);
Task<IRemoteStreamContent> DownloadAsync(BlobFileGetByNameIntegrationDto input);
}

8
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/PrivateBlobClientProxy.Generated.cs

@ -51,17 +51,17 @@ public partial class PrivateBlobClientProxy : ClientProxyBase<IPrivateBlobAppSer
});
}
public virtual async Task<IRemoteStreamContent> GetContentAsync(Guid id)
public virtual async Task<IRemoteStreamContent> DownloadAsync(Guid id)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<IRemoteStreamContent> GetContentByNameAsync(string name)
public virtual async Task<IRemoteStreamContent> DownloadByNameAsync(string name)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentByNameAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadByNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});

8
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/LINGYUN/Abp/BlobManagement/PublicBlobClientProxy.Generated.cs

@ -19,17 +19,17 @@ namespace LINGYUN.Abp.BlobManagement;
[ExposeServices(typeof(IPublicBlobAppService), typeof(PublicBlobClientProxy))]
public partial class PublicBlobClientProxy : ClientProxyBase<IPublicBlobAppService>, IPublicBlobAppService
{
public virtual async Task<IRemoteStreamContent> GetContentAsync(Guid id)
public virtual async Task<IRemoteStreamContent> DownloadAsync(Guid id)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<IRemoteStreamContent> GetContentByNameAsync(string name)
public virtual async Task<IRemoteStreamContent> DownloadByNameAsync(string name)
{
return await RequestAsync<IRemoteStreamContent>(nameof(GetContentByNameAsync), new ClientProxyRequestTypeValue
return await RequestAsync<IRemoteStreamContent>(nameof(DownloadByNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});

10265
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobManagement.HttpApi.Client/ClientProxies/blob-management-generate-proxy.json

File diff suppressed because it is too large

2
aspnet-core/modules/blob-management/LINGYUN.Abp.BlobStoring.BlobManagement/LINGYUN/Abp/BlobStoring/BlobManagement/BlobManagementBlobProvider.cs

@ -40,7 +40,7 @@ public class BlobManagementBlobProvider : BlobProviderBase, ITransientDependency
public async override Task<Stream?> GetOrNullAsync(BlobProviderGetArgs args)
{
var content = await _blobService.GetContentAsync(
var content = await _blobService.DownloadAsync(
new BlobFileGetByNameIntegrationDto
{
ContainerName = args.ContainerName,

4
common.props

@ -14,6 +14,10 @@
<GeneratePackageOnBuild Condition="$(AssemblyName.StartsWith('LINGYUN'))">true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="$(AssemblyName.EndsWith('HttpApi.Client'))">
<NoWarn>$(NoWarn);CS8618</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Remove="LocalNuget\**" />
<EmbeddedResource Remove="LocalNuget\**" />

Loading…
Cancel
Save