Quote from: gl_sub at Sep 23, 2009, 02:48 AM
Thank you for your answer ! I haven’t seen that option on the file line.
It is not working for images (jpg) by default, i found that you have to enable the jpg file type in Tools > Configuration > file manager > authorized file types. Thus you can see the jpg images by clicking on the icon (but to download them you have to do it by yourself : right click=>save image as... : maybe there is an easier way ?)
Its actually a bit tricky, to trigger a download of a file you need only link to it as you would an image.
The problem with this approach is that your browser will open an image in a new window.
The way to do it would be to force a download by changing the headers. U could use a php file to become a bridge between the user and the image:
<?php
$file = $_GET[’file’];
$filename = $_GET[’filename’];
header ("Content-type: octet/stream");
header ("Content-disposition: attachment; filename=".$filename.";");
header("Content-Length: ".filesize($file));
readfile($file);
exit;
?>
If you pass the filename into the above it should force an image download, rather than just opening a popup.
No idea how to tie this functionality into the File Manager, perhaps one of the core boffins can step in here. Would be way easier to "force" your user you simply right click!!!