You just say what is already described in the manual.
And looking at our issue list you would have mentioned that we will also add a content-type validator which checks the stored content, as the mime-type can be changed by users.

As I already wrote several times, this component is not finished and under continous development.

However, Apache, for example provides related modules which DO handle this also for the mime-type.

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

----- Original Message ----- From: "Yann Thomas-Gérard" <[EMAIL PROTECTED]>
To: <fw-general@lists.zend.com>
Sent: Thursday, September 25, 2008 5:02 PM
Subject: Re: [fw-general] Breakchain on Zend_Form_Element_File fail


Yann Thomas-Gérard a écrit :
Nice, but you can not rename the file yourself.
Validation is done on the temporary file, then the file is moved and then the filter is attached.

What I meant was:
If I click on my navigator's browse button and select the 'a.jpg' file from my harddisk, validation passes.

So when you rename the file, you rename it after validation and filtering.
There is no processing after that point.

To resume, I got $breakChainOnFailure to work with the latest trunk.

As for the MimeType validator, I think it checks the type in the files array from php. This info is not reliable:

From http://fr.php.net/manual/en/features.file-upload.php

[...]
 $_FILES['userfile']['type']

The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.
[...]

It could probably be better with this PECL extension:
http://fr.php.net/manual/en/ref.fileinfo.php

Reply via email to