[英]How can I make a link to invoke the download dialog box rather than it being shown
How can I modify 我该如何修改
<a href="someimage">Download this</a>
in order to invoke the download dialog box? 为了调用下载对话框?
You could send a 您可以发送一个
Content-disposition: attachment; filename=someimage.jpg
HTTP header. HTTP标头。
Instruct the server to send it with a generic binary MIME type - binary/octet-stream is good for this. 指示服务器使用通用二进制MIME类型发送它-二进制/八位字节流对此很有用。 Standards conforming browsers will then just download it. 然后,符合标准的浏览器将直接下载它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.