|
|||
|
Hello everybody,
I have a simple upload form and it had worked perfectly until recently. It seems that file transfer validators don't work. I want them to validate simple images. FilesSize validator always gives "All files in sum should have a maximum size of '0B' but '1550' were detected" MymeType validator says "The file 'image.gif' has a false mimetype of 'image/gif'" ImageSize validator doesn't throw an error, but it doesn't validate either. If I exclude validators, upload succeeds. I regularly update zend using subversion. Can somebody please help me, I don't know what else to try to make iz work. Thanks ![]() Here is the code: PHP Code:
Last edited by kiboke : 10-03-2008 at 02:38 PM. |
|
|||
|
And you think that anyone can say something about your problem, without to know what your file was ?
__________________
Greetings Thomas Weidner I18N Team Leader, Zend Framework http://www.thomasweidner.com |
|
|||
|
Quote:
that is all that is connected to file uploading. and all worked well for few months, a week ago stoped working on all of my projects.what other information should i provide? thanks for helping me. |
|
|||
|
As I said... declare your file... without the knowledge what you've uploaded how can we say whats going wrong ?
How your code works changes with every file you upload.
__________________
Greetings Thomas Weidner I18N Team Leader, Zend Framework http://www.thomasweidner.com |
|
|||
|
Quote:
![]() PHP Code:
|
|
|||
|
Superb... and now give us the $_FILES array you uploaded and the returned error messages which holds the information of the file you uploaded and is what I wanted.
Then we will see where your problem is.
__________________
Greetings Thomas Weidner I18N Team Leader, Zend Framework http://www.thomasweidner.com |
|
|||
|
$_FILES:
PHP Code:
PHP Code:
|
|
|||
|
When working with the latest release you should also read the manual of the latest release.
In conjunction to Zend_Form a breakChainOnFailure parameter was added. Looking in the API doc of addValidator you would have seen this. Simply add a "false" or "true" in front of the parameters like you are doing when using forms.
__________________
Greetings Thomas Weidner I18N Team Leader, Zend Framework http://www.thomasweidner.com |
|
|||
|
Quote:
|
|
|||
|
I don't get it. Another update and it doesn't work again.
$upload->addValidator('MimeType', true, 'image'); allows me to upload any kind of file. PHP code is the save as before (please see older replies to this thread). $_FILES sais: PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|