Browse Source

Merge pull request #5013 from abpframework/liangshiwei/blob-minio-patch-1

Use CopyToAsync to copy the stream
pull/5022/head
maliming 6 years ago
committed by GitHub
parent
commit
dac3964ab7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProvider.cs

4
framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProvider.cs

@ -72,11 +72,11 @@ namespace Volo.Abp.BlobStoring.Minio
} }
var memoryStream = new MemoryStream(); var memoryStream = new MemoryStream();
await client.GetObjectAsync(containerName, blobName, stream => await client.GetObjectAsync(containerName, blobName, async stream =>
{ {
if (stream != null) if (stream != null)
{ {
stream.CopyTo(memoryStream); await stream.CopyToAsync(memoryStream);
} }
else else
{ {

Loading…
Cancel
Save