sending pdf with "allowed = image/*"

See all posts Reply

sending pdf with "allowed = image/*"  new!
by up_and_downloader, 15 years ago
Hello,

this is my code :
$handle = new upload($_FILES['image_field']);
if ($handle->uploaded) {
  if ($handle ->file_src_mime== "image/jpeg" && $handle ->file_is_image== true )

Why is it possible to send pdf or microsoft Thumb.db files ?Reply
Re: sending pdf with "allowed = image/*"  new!
by colin, 14 years, 12 months ago
I am not too sure what you mean. Can you copy here the log produced by the class?

To allow or forbid some MIME types, you should do as following, before calling process():
$handle->allowed = array('xxx/yyy', 'zzz/*'');

The check on MIME types is done when calling process(), not before.Reply