ZF2 - Change name fileinput in form

For programming and general questions on Zend Framework

ZF2 - Change name fileinput in form

Postby fernando_arbelo on 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');
$adapter->setDestination(dirname(__DIR__));

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

If someone could help me from now thank you very much!
fernando_arbelo
 
Posts: 1
Joined: Tue Nov 20, 2012 7:48 pm

Return to Zend Framework

Who is online

Users browsing this forum: aramhovsepyan, Majestic-12 [Bot] and 6 guests