When are you doing what ?
The correct order of how files are processed is important.
For example: receive() can return true when you say that the file element is
allowed to be empty.
But getFileName will not return a filename in this case as there is no file.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
- Original Message -
From: "monk.e.boy"
To:
Sent: Tuesday, April 20, 2010 9:02 PM
Subject: [fw-general] Zend_Form_Element_File question
Hi,
I am using Zend_Form_Element_File like this:
$image = new Zend_Form_Element_File('image');
$image->setLabel('Picture ')
->setDescription('Browse your PC for an image')
->addValidator('Count', false, 1)
->addValidator('Extension', false, 'jpg,png,gif');
When I submit the form with no file selected it is valid and then doing:
$this->image->receive();
returns true. This:
$location = $this->image->getFileName();
returns an empty array.
Any ideas on what I am doing wrong?
Thanks,
monk.e.boy
--
View this message in context:
http://n4.nabble.com/Zend-Form-Element-File-question-tp2017862p2017862.html
Sent from the Zend Framework mailing list archive at Nabble.com.