Problem renaming the body name

See all posts See thread Reply

Re: Problem renaming the body name new!
by Shasha, 17 years, 10 months ago
first thanks for this class...
I try to rename uploaded images . It isn't usually work sometimes the image uploaded with its name and doesn't changed my code
$new_name=0;   
$image_width=350;
foreach($_FILES as $file) {	     
  $MyObject = new upload($file);
  if ($MyObject->uploaded) {
    $MyObject->file_new_name_body = $new_name;
    $MyObject->file_max_size      = $max_size;
    $MyObject->image_convert      = $imgae_type;
    $MyObject->image_resize       = true;
    $MyObject->image_x            = $image_width;
    $MyObject->image_ratio_y      = true;
    $MyObject->process($image_dir);
    if ($MyObject->processed) {
      $MyObject->clean();
    } else {
      echo 'error : ' . $MyObject->error;
    }
  }
  $new_name++;
}

thanks ...Reply
Re: Problem renaming the body name new!
by colin, 17 years, 10 months ago
Can you please copy here the log from the class? You can call
echo $MyObject->log;
before
$MyObject->clean();
Reply