Image upload preview does not work without Clean URLs
rszrama - January 6, 2009 - 19:29
| Project: | Upload element |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
It's really easy to support this...
Change lines 411 - 412:
<?php
$src = 'upload_element/'. $element['#build_id'] .'/'. $element['#name'] .'/'. $fid;
return '<div class="upload-element-preview"><img src="'. base_path() . $src .'" alt="'. t('Image preview') .'" /></div>';
?>To this:
<?php
$src = url('upload_element/'. $element['#build_id'] .'/'. $element['#name'] .'/'. $fid);
return '<div class="upload-element-preview"><img src="'. $src .'" alt="'. t('Image preview') .'" /></div>';
?>(Sorry, can't roll this as a patch atm.)

#1
Thanks Ryan. I've committed it to CVS.
#2
Automatically closed -- issue fixed for two weeks with no activity.