href image link download on click

后端 未结 10 2017
失恋的感觉
失恋的感觉 2020-11-22 07:56

I generate normal links like: in a web app.

When I click on the link, it

10条回答
  •  佛祖请我去吃肉
    2020-11-22 08:26

    No, it isn't. You will need something on the server to send a Content-Disposition header to set the file as an attachment instead of being inline. You could do this with plain Apache configuration though.

    I've found an example of doing it using mod_rewrite, although I know there is a simpler way.

提交回复
热议问题