Merhaba,
verot.net upload sınıfını kullanıyorum. Yüklenen resmin 3 farklı halini kaydetmeye çalışıyorum. 1.si yüklendiği hali, 2.si gri hali, 3.sü belirlediğim boyutlardaki hali. Orjinal ve gri halini yükleyebiliyorum bir problem yok fakar thumbnail olayına girdiğim zaman herhangi bir sonuç alamıyorum. Nerede hata yapıyorum?
$default='';
$other='';
$files = array();
foreach ($_FILES['images'] as $k => $l) {
foreach ($l as $i => $v) {
if (!array_key_exists($i, $files))
$files[$i] = array();
$files[$i][$k] = $v;
}
}
$uploaded = array();
foreach ($files as $file):
$handle = new Upload($file);
if ($handle->uploaded):
$this_upload = array();
$handle->file_new_name_body = substr(base64_encode(uniqid(true)), 0, 20);
$handle->Process(realpath("../")."/uploads/products/default/");
$this_upload[] = $handle->file_dst_name;
$default = $default. $handle->file_dst_name . ',';
//Generate greyscale
$handle->image_greyscale = true;
$handle->file_new_name_body = substr(base64_encode(uniqid(true)), 0, 20);
$handle->Process(realpath("../")."/uploads/products/other/");
$other = $other. $handle->file_dst_name . ',';
//Generate thumbnail
$handle->image_resize = true;
$handle->file_new_name_body = substr(base64_encode(uniqid(true)), 0, 20);
$handle->image_x = 120;
$handle->image_y = true;
$handle->Process( realpath("../")."uploads/products/thumb/" );
endif;
endforeach;