Closed it-can closed 9 years ago
Also posted here:
https://github.com/fuel/core/issues/1914
Hi,
I just noticed that when updating to fuelphp/upload 2.0.3 the saved_as name is not set in v2.0.2 it works correct!
saved_as
Tested in my production enviroment and my development...
This is my example code:
// Custom configuration for this upload $config = [ 'path' => IMGPATH, 'randomize' => true, 'ext_whitelist' => ['jpg', 'jpeg', 'gif', 'png'], 'overwrite' => true, 'auto_rename' => false, 'field' => 'avatar', 'file_chmod' => 0777, 'max_size' => 3000000, // 3mb ]; \Upload::process($config); // if there are any valid files if (\Upload::is_valid()) { // save them according to the config \Upload::save(); if ($file = \Upload::get_files(0)) { var_dump($file); } }
Output in v2.0.3
Array ( [field] => avatar [saved_as] => [name] => 11427658_936584796393922_3750488840083698280_n.jpg [type] => image/jpeg [file] => /tmp/php/phpfxSlP9 [error] => [size] => 161985 [extension] => jpg [basename] => 11427658_936584796393922_3750488840083698280_n [mimetype] => image/jpeg [saved_to] => /site/public/assets/img/ [errors] => Array ( ) )
Output in v2.0.2
Array ( [field] => avatar [saved_as] => 450c5e37a92863cea046e39f7bd8ae36.jpg [name] => 11427658_936584796393922_3750488840083698280_n.jpg [type] => image/jpeg [file] => /tmp/php/phpznTKtd [error] => [size] => 161985 [extension] => jpg [basename] => 11427658_936584796393922_3750488840083698280_n [mimetype] => image/jpeg [saved_to] => /site/public/assets/img/ [errors] => Array ( ) )
Hello, please test with 2.0.4, hope it is fixed for you
It seems to work! thanks
Also posted here:
https://github.com/fuel/core/issues/1914
Hi,
I just noticed that when updating to fuelphp/upload 2.0.3 the
saved_as
name is not set in v2.0.2 it works correct!Tested in my production enviroment and my development...
This is my example code:
Output in v2.0.3
Output in v2.0.2