This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Zend\Filter\File\RenameUpload behaves differently when folder exists and not #4
Open
Description
code example:
$filter = new \Zend\Filter\File\RenameUpload([
'target' => './public/img/logotypes/logo',
'use_upload_extension' => true,
'randomize' => true,
]);
$file = $filter->filter($file_data);
echo $file['tmp_name'];
when logo
folder exists returned value would be:
./public/img/logotypes/logo/phpj7GsVi_55f03311ed828.jpg
when logo
folder doesn't exists returned value would be:
./public/img/logotypes/logo_55f034e642bf3.jpg
I can't beleave this is desired behavior because this can lead to bugs.
Guess I used this incorrectly because I wanted logo prefix this worked for me until someone created logo folder then everything gone bad :(