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