2015-10-02 08:48:35 [127.0.0.1][-][mo8sevcudbtgo64vm8grb85r75][error][yii\base\InvalidParamException] exception 'yii\base\InvalidParamException' with message 'The file or directory to be published does not exist: /private/var/www/dist' in //vendor/yiisoft/yii2/web/AssetManager.php:452
Stack trace:
#0
#1
#2
public static function uploadFile()
{
$imgUrl = '/images/collection/';
if (isset($_FILES['file'])) {
$filename = pathinfo($_FILES['file']['name'], PATHINFO_FILENAME);
$ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
$fn = Utils::translitUrl($filename).'-'.$uid.'.'.$ext;
$destination = IMAGE_COLLECTION. '/' . $fn;
move_uploaded_file( $_FILES['file']['tmp_name'] , $destination );
return ['filename'=>$fn];
} else
return ['error'=>true];
}