摘要: 如果将ContentType设置为application/octet-stream,那么在浏览器中会自动下载,需要将ContentType设置为对应类型 还有一种是设置了错误的参数,去掉文件名即可 public ActionResult Image() { string filePath = "D: 阅读全文
posted @ 2023-09-19 15:12 奇迹之耀 阅读(51) 评论(0) 推荐(0) 编辑
摘要: public ActionResult Image() { string filePath = "D:\\123.png"; Response.Cache.SetExpires(DateTime.Now.AddDays(365)); // 缓存有效期为365天 Response.Cache.SetC 阅读全文
posted @ 2023-09-19 15:03 奇迹之耀 阅读(38) 评论(0) 推荐(0) 编辑