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