Avatar

doc and pdf upload possibility (Features)

by Micha ⌂, Monday, November 02, 2009, 14:13 (5288 days ago) @ Eelco
edited by Micha, Monday, November 02, 2009, 14:57

Hi,

unset($errors);
$image_info = filesize($_FILES['probe']['tmp_name']);
#$image_info = getimagesize($_FILES['probe']['tmp_name']);

Okay, and $image_info is empty or false? Try $_FILES['probe']['size'] to get the filesize.

And then, you need a new switch point because the next restriction:

if(!is_array($image_info) || $image_info[2] != 1 && $image_info[2] 
!= 2 && $image_info[2] != 3 && $image_info[2] != 4 && $image_info[2] != 5) 
$errors[] = 'invalid_file_format';

is not true!

regards Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

locked
14627 views

Complete thread:

 RSS Feed of thread