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
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

Alan D. - January 7, 2009 - 10:31
Status:needs review» fixed

Thanks Ryan. I've committed it to CVS.

#2

System Message - January 21, 2009 - 10:40
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.