ZF2 - Change name fileinput in form

For programming and general questions on Zend Framework
Post Reply
Posts: 1
Joined: Tue Nov 20, 2012 7:48 pm

ZF2 - Change name fileinput in form

Post by fernando_arbelo » Tue Nov 20, 2012 8:02 pm

I wish I could save a file sent in a form with a default name and not the original file name, for example upload an image "image.jpg" and save it as "img.jpg".

Below left the code I'm using:

// in the controller
if ($form->isValid()) {
$adapter = new Http();
$field = $this->params()->fromFiles('advertencia');

if ($adapter->receive($field['name'])) {

If someone could help me from now thank you very much!

Post Reply