在浏览器中<a href="http://www.cnblogs.com/xiaohui108/aa.jpg">下载</a>这样写的话,则是当前窗口打开aa.jpg,如果想点击后直接弹出下载框的话,则需要服务器端将图片的http设置成

add_header Cache-Control "no-cache, no-store";
add_header Content-Type "application/octet-stream";
add_header Content-Disposition "attachment; filename=$request_body_file";

在浏览器中显示图片的http头来Content-Type "image/jpg"

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-06
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案