增加flush 测试
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3fdfb3cc4b
commit
c8d181e557
|
|
@ -544,22 +544,23 @@ public class OSSService : IOSSService
|
|||
var args = new GetObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(ossRelativePath)
|
||||
.WithCallbackStream(stream =>
|
||||
.WithCallbackStream(async source =>
|
||||
{
|
||||
stream.CopyTo(pipe.Writer.AsStream());
|
||||
await source.CopyToAsync(pipe.Writer.AsStream());
|
||||
await pipe.Writer.FlushAsync();
|
||||
});
|
||||
|
||||
await minioClient.GetObjectAsync(args);
|
||||
await pipe.Writer.CompleteAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
finally
|
||||
{
|
||||
await pipe.Writer.CompleteAsync(ex);
|
||||
await pipe.Writer.CompleteAsync();
|
||||
}
|
||||
});
|
||||
|
||||
return pipe.Reader.AsStream();
|
||||
|
||||
|
||||
#region 废弃2
|
||||
|
||||
//var pipe = new System.IO.Pipelines.Pipe();
|
||||
|
|
|
|||
Loading…
Reference in New Issue