Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
hello ... I may be shot down in flames for posting this question! It isn't a Couch question but on the offchance that some helpful Coucher has the answer I'm chancing it ...

I have spent some time trying to pin down the answer to what seems quite a simple thing ... which is to force a download dialog to pop up on clicking a link to an image file rather than displaying the image. I want the site visitor to be able to simply save the image to their computer. I am a bit wary about implementing a php solution I might find at random on the internet as it seems I could make other files vulnerable to download - I'm not a php person.

Thanks if anyone does reply and if nobody replies I won't be surprised or offended!
Hi,

Perhaps Couch's 'Cloaked links' (http://www.couchcms.com/docs/concepts/c ... links.html) feature would help?
Setting the 'force_download' parameter will always show a dialog-box prompting to download.
Code: Select all
<a href="
    <cms:cloak_url
    link='http://yoursite.com/test.jpg'
    force_download='1'
    />
">Test Link</a>

Do let us know. Thanks.
:D
3 posts Page 1 of 1
cron