You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am simply referencing the incorrectly closed issue #225 about the same problem which is especially valid in ASP.NET and, consequently, for a big part, if not majority, of .NET applications.
Giving access to the underlying Stream for the file object stored in MinIO only via a callback is not idiomatic .NET code. It is weird and unusable in the use case where an ASP.NET controller needs to return the large file via return File(stream, mimeType);
[HttpGet]publicasyncTask<IActionResult>DownloadFile([FromQuery]stringbucketName,[FromQuery]stringobjectName){GetObjectArgsgetObjectArgs=new GetObjectArgs().WithBucket(bucketName).WithObject(objectName).WithCallbackStream(async(stream,ct)=>{// copying the stream to Response.Body results into// the entire file being loaded in the memory of the server});ObjectStatobjectStat=await minio.GetObjectAsync(getObjectArgs);return File(whatStream???, objectStat.ContentType);}
What is needed here is the actual Stream instance, so that it can be passed to the File method.
The text was updated successfully, but these errors were encountered:
cvetomir-todorov
changed the title
Download large files via ASP.NET
Download large files in ASP.NET
Jan 3, 2024
I am simply referencing the incorrectly closed issue #225 about the same problem which is especially valid in ASP.NET and, consequently, for a big part, if not majority, of .NET applications.
Giving access to the underlying
Stream
for the file object stored in MinIO only via a callback is not idiomatic .NET code. It is weird and unusable in the use case where an ASP.NET controller needs to return the large file viareturn File(stream, mimeType);
What is needed here is the actual
Stream
instance, so that it can be passed to theFile
method.The text was updated successfully, but these errors were encountered: