estaba buscando de como puede devolver el nuevo nombre al subir la imagen
este es me codigo:
Código PHP:
Ver original
$fileInput = new InputFilter\FileInput('image-file'); $fileInput->setRequired(true); // You only need to define validators and filters // as if only one file was being uploaded. All files // will be run through the same validators and filters // automatically. $fileInput->getValidatorChain() // All files will be renamed, i.e.: // ./data/tmpuploads/avatar_4b3403665fea6.png, // ./data/tmpuploads/avatar_5c45147660fb7.png $filter = $fileInput->getFilterChain()->attachByName( 'filerenameupload', 'target' => './data/tmpuploads/img.png', 'randomize' => true, ) ); $inputFilter->add($fileInput); $this->setInputFilter($inputFilter);