Guest User

Untitled

a guest
Jan 13th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $og_filename = $_FILES[$this->getForm()->getPhotoField()]['name'];
  2. $filename = strtolower(uniqid() . "_" . $og_filename);
  3. $estimatedDest = $this->getForm()->getDestination() . DIRECTORY_SEPARATOR . $filename;
  4. $this->getForm()->getElement($this->getForm()->getPhotoField())->addFilter('Rename', array('target' => $estimatedDest));
  5.  
  6. // $estimatedDest == valid writeable path + filename
Add Comment
Please, Sign In to add comment