示例#1
0
        public async Task <IActionResult> DownById()
        {
            string id       = (string)this.ControllerContext.RouteData.Values["id"];
            string filename = (string)this.ControllerContext.RouteData.Values["filename"];
            var    result   = await _fileService.DownloadAsync(id);

            return(File(result.Content, result.ContentType, filename ?? result.FileName));
        }