'file', ); /** * Prepare the form element (mostly used for rendering purposes) * * @param FormInterface $form * @return mixed */ public function prepareElement(FormInterface $form) { // Ensure the form is using correct enctype $form->setAttribute('enctype', 'multipart/form-data'); } /** * Should return an array specification compatible with * {@link Zend\InputFilter\Factory::createInput()}. * * @return array */ public function getInputSpecification() { return array( 'type' => 'Zend\InputFilter\FileInput', 'name' => $this->getName(), 'required' => false, ); } }