image link to file

Permalink
Is this possible

 
JohntheFish replied on at Permalink Reply
JohntheFish
Files can have a direct download link where c5 effectively streams the file through a php route. You would need to wrap the image with that link.
tonyswaby replied on at Permalink Reply
Not a straight forward thing then?
JohntheFish replied on at Permalink Reply
JohntheFish
You can get the dowload url under file properties, best to use the 'Tracked URL'.

The rest depends on how you want to add a link to an image. If its an image block, paste the link from above as an 'external URL'. You can do similar with a link about an image in a content block.
JohntheFish replied on at Permalink Reply
JohntheFish
Another thought. The core now includes the document library. Perhaps a custom template for that would provide a solution.
Steevb replied on at Permalink Reply
Steevb
Can you not just link to the file with an image block and choose 'Image Link' - 'File'?
JohntheFish replied on at Permalink Reply
JohntheFish
Does that create a forced download? Not something I have used.
Steevb replied on at Permalink Reply
Steevb
Yes.

Maybe a bit more info from op would help.
tonyswaby replied on at Permalink Reply
The idea is that the client can upload a file to C5 and link to it via an image rather than a text link. Calling an externally hosted file would add too much complication for them.
tonyswaby replied on at Permalink Reply
no "another page" and "external file" is all you get I'm afraid. (I'm using 5.7)
tonyswaby replied on at Permalink Reply
I think it used to have "file" as an option?
JohntheFish replied on at Permalink Reply
JohntheFish
If necessary I would guess its a straight forward custom template to create for an image block. Just have to change the code that links from the image to get the forced download link for the file object. There is a method on the file or file version object that gets a forced download link.
tonyswaby replied on at Permalink Reply
yeah but you'd have to give the client a choice of the file from the library so it's not just about how it displays.
JohntheFish replied on at Permalink Reply
JohntheFish
There is already a file selector in image link part of the edit dialog. Its the implementation of how the selected file is output as a link that would change.
tonyswaby replied on at Permalink Reply
Not on my version there isn't? (5.7)
JohntheFish replied on at Permalink Reply
JohntheFish
Just looked at it in 8.3.1