Download & Extend

Image upload preview does not work without Clean URLs

Project:Upload element
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

Status:needs review» fixed

Thanks Ryan. I've committed it to CVS.

#2

Status:fixed» closed (fixed)

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

nobody click here