Hi,
here i am uploading an image, and resizing that image in to two different size and trying to store it in to different folders, but here image is not uploading to the directory which i specified first, but it is uploading in to second one,
here is the code which i used
$file = file_save_upload($file, $directory.'/'. $file->filename, FILE_EXISTS_RENAME);
$destination= $directory.'/'.$file->filename;
$fname = $directory.'/'.$file->filename;
$width = '334';
$height = '333';
image_resize($fname, $destination, $width, $height);
$filepath = $fname;
$file1 = file_save_upload($file1, $directory_thumb.'/'. $file1->filename, FILE_EXISTS_RENAME);
$destination1= $directory_thumb.'/'.$file1->filename;
$fname1 = $directory_thumb.'/'.$file1->filename;
$width1 = '120';
$height1 = '200';
image_resize($fname1, $destination1, $width1, $height1);
$filepath1 = $fname1;
please help me in solving this
Thanks in advance
Uvaraj
Comments
Comment #1
uvaraj25 commentedHi,
please can i get solution for the above issue,
please help me in solving this
thanks
uvaraj
Comment #2
ultimateboy commentedCheck out the imagecache module. Its functionality should solve your needs.