force download

Permalink Browser Info Environment
Hello, I'm trying to force the link to open the "save as" dialog box to download the image file. I've tried adding the HTML5 "download" attribute as follows: (line #104 in view.php)
<a href="<?php  echo $fv->getURL();?>" download class="jl_thumbnails_with_links_image_link" rel="jl_thumbnails_with_links_image_group"> <?php  $im->outputThumbnail($f, 150, 150);?> </a>

but that doesn't work in IE or Safari.
Any help is much appreciated!!!

Type: Discussion
Status: Archived
SiteQwester
View Replies:
JohntheFish replied on at Permalink Reply
JohntheFish
The method you need is getDownloadURL(). It works on the file version object.

http://www.concrete5.org/documentation/developers/files/files-and-f...
http://www.weblicating.com/doku/doku.php?id=cheatsheet/#display_get...

Also, I think the original List Files From Set default template provides download URLS
http://www.concrete5.org/marketplace/addons/list-files-from-set/#...

If you want to build a massively capable File List, have a look at Uber List
http://www.concrete5.org/marketplace/addons/uber-list/...

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.