🐛 修复导出偶现出错
This commit is contained in:
parent
0842d1b4ec
commit
3f66fc9e60
@ -61,6 +61,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
//IWebHostEnvironment webHostEnvironment = (IWebHostEnvironment)App.ServiceProvider.GetService(typeof(IWebHostEnvironment));
|
||||
//string fileDir = Path.Combine(webHostEnvironment.WebRootPath, path, fileName);
|
||||
|
||||
Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
var stream = Io.File.OpenRead(path); //创建文件流
|
||||
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", HttpUtility.UrlEncode(fileName));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user