I tried it and it seems that it is passing my validation

$upload = new Zend_File_Transfer_Adapter_Http ( );

# Set file validation rules
$upload->addValidator ( 'Size', false, 20000 )
   ->addValidator ( 'Count', false, 1 )
   ->addValidator ( 'Extension', false, 'jpg,gif' )
   ->addValidator ( 'IsImage', false, 'jpeg,gif' )
   ->addValidator ( 'MimeType', false, array ('image/gif', 'image/jpeg' )
);


I changed the extension of one php file from php to jpg and i managed to
upload this file!

am I missing something in my validation rules?

See the manual notes about the mime type validator.
It uses eighter fileinfo or mimetype extension.
Only when both are not available the browser given type is used.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

Reply via email to