.net core下载文件

        [HttpGet("get-stream-file/{id}")]
        public async Task<IActionResult> Download(string id)
        {
            Stream stream=await { { _get_stream_by_file-id} };

            if (stream == null)
                return NotFound();

            return File(stream, "application/octet-stream");
        }

 

posted @ 2021-10-25 22:38  RookieCoderAdu  阅读(460)  评论(0编辑  收藏  举报