2021年1月7日星期四

Piping a file downloaded from external source to web API response in .net core 3.0

I have a .net core web API wherein one of the endpoints I download a file from an external source, load it into a MemoryStream, then return the MemoryStream as StreamResult. This causes the application to consume a lot of memory for large files. I am looking for a way to directly pipe the download stream to the user.

https://stackoverflow.com/questions/65623307/piping-a-file-downloaded-from-external-source-to-web-api-response-in-net-core-3 January 08, 2021 at 12:04PM

没有评论:

发表评论