File Rename

See all posts Reply

File Rename new!
by Mat, 16 years, 5 months ago
Hi There,

I have the following code
$handle = new Upload("$path/temp/" . $savedname);
$handle->image_resize  = true;
$handle->image_ratio_= true;
$handle->image_= $image_size_small;
$handle->image_convert         = 'jpg';
$handle->jpeg_quality          = 80;    
$handle->Process("$path/small/");
$filename=$handle->file_dst_name;

This works file if the file is not being renamed, but if the file gets renamed the file_dst_name take the orignal upload name i.e.

upload bluesqaure.png gets converted and renamed to bluesquare.jpg

upload bluesquare.png a second time and it dosent get converted to jpg and the name is blusquare_1.png

Any ideas?Reply
Re: File Rename new!
by colin, 16 years, 5 months ago
The following line in your code is wrong:
$handle->image_= $image_size_small;

Which version of the class are you using?

Can you copy here $handle->log for both processes of the image?Reply