Issue : Local file doesn't exist

See all posts Reply

Issue : Local file doesn't exist new!
by sorryss, 11 years, 2 months ago
I am getting this message when i attempt to upload an image.

"Local file doesn't exist"

here is my log;

system information
- class version : 0.31
- operating system : Darwin
- PHP version : 5.4.4
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 32M (33554432 bytes)
- language : en_GB
source is a local file parla_94673.jpg


Here is my code;
$handle = new upload($_FILES['avatar']['name']);
if($handle->uploaded) {
  $handle->process(STORAGE_DIRECTORY);
  if($handle->processed) {
    $response = array('status' => 'true');
    $handle->clean();
  } else $response = array('status' => 'false');
} else $response = array('status' => 'false');

Any help would be very appreciated. Thanks!Reply
Re: Issue : Local file doesn't exist new!
by colin, 11 years, 2 months ago
That is strange... Can you use version 0.32 and try again?Reply
Re: Issue : Local file doesn't exist new!
by sorryss, 11 years, 2 months ago
nope, i'll try and write here again. Thanks your interest!

and extra info; I use this code snippet with a very simple jquery plugin which i coded for the image uploading without page refresh (i used iframes). Maybe this help about it.Reply
Re: Issue : Local file doesn't exist new!
by colin, 11 years, 2 months ago
Do you have enctype="multipart/form-data" in your form tag?Reply
Re: Issue : Local file doesn't exist new!
by sorryss, 11 years, 2 months ago
Sorry for lately answer.

I solved it!

i changed this line ;
$handle = new upload($_FILES[$q[2]]['name']);

to this;
$handle = new upload($_FILES[$q[2]]);

and now it works fine.

Thanks for your all effort to help me out and for this amazing class.
All the best.

Ps: i use the newest version. 0.32Reply