Closed (fixed)
Project:
Upload previews
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2007 at 22:12 UTC
Updated:
11 Mar 2007 at 16:35 UTC
Your module is really great. But there is a little something missing to make "private" previews working :
function upload_preview_file_download($file) {
$preview = file_create_path(variable_get('upload_preview_path', 'preview'));
$file_info = pathinfo(file_create_path($file));
if ($file_info['dirname'] == $preview) {
return array('Content-Type: image/' . $file_info['extension']);
}
}
Otherwise, there is no module to give the headers and it results in a "Page not found".
An easy fix for a great module! :-) Thank you.
Comments
Comment #1
toeofdestiny commentedI added a strtolower, it may be important :
Comment #2
kkaefer commentedWow, thank you! I have updated the module to support private file systems. I did not release a new version. To get the new feature, please download the nightly tarball from http://drupal.org/node/109067.
Comment #3
(not verified) commented