1 public IActionResult down(int id, string filename) 2 { 3 string path = hostingEnvironment.WebRootPath + "/ContractFiles/" + id + "/" + filename; 4 5 6 var contentType = "APPLICATION/octet-stream"; 7 8 FileStream fs = new FileStream(path, FileMode.Open); 9 return File( fs, contentType, filename); 10 11 12 }
标签:core,asp,FileStream,filename,fs,net,id From: https://www.cnblogs.com/sunzzhankui/p/17289100.html