开发者

Link to download image instead of view image (CANT Change Content-Disposition Header)

开发者 https://www.devze.com 2023-04-03 13:51 出处:网络
I have a Django app and all the static content is handled through NGINX.I want to allow users to download a couple of static resources (photos) in their client by clicking on a 开发者_如何学Pythonlink

I have a Django app and all the static content is handled through NGINX. I want to allow users to download a couple of static resources (photos) in their client by clicking on a 开发者_如何学Pythonlink in the markup.

To make the link/resource downloadable, I know I could change the Content-Disposition. Unfortunately, since all my static assets are being served through NGINX, this seems problematic. I don't want to create a view just to change the Content-Disposition and make the image downloadable.

Is there anything that I can do here via jQuery or otherwise?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号