Only jpg images

See all posts Reply

Only jpg images new!
by Fia, 13 years, 8 months ago
How do I get it to only accept jpg images?
I've tried:
$folder="../produkter"; 	
$handle = new Upload($_FILES['image']);
if ($handle->uploaded) {
  $handle->allowed 	 = array('image/jpg');
  $handle->file_new_name_body    = $bildnamn;
  $handle->file_overwrite	= true;
  $handle->file_auto_rename      = false; 
  $handle->image_resize          = true;
  $handle->image_ratio           = true;
  $handle->image_y               = 600;
  $handle->image_x               = 600;
  $handle->jpeg_quality		   = 95;
  $handle->Process($folder);

it worked fine before i put the allowed line in. ???Reply
Re: Only jpg images new!
by colin, 13 years, 8 months ago
Maybe the mime is image/jpeg. You should look in the log of the class what MIME is detected.Reply
Re: Only jpg images new!
by Fia, 13 years, 8 months ago
I know it would be something easy, thanks it worksReply