abilham
(Andrewbilham)
May 30, 2017, 2:01pm
1
Hi,
I am using Kartik-V Fileinput which I did have working but it seems to have glitched and I think it may be due to setting the global Parameters.
if I want to set the below:
Yii::$app->params[‘uploadPath’] = Yii::$app->basePath . ‘/uploads/’;
Yii::$app->params[‘uploadUrl’] = Yii::$app->urlManager->baseUrl . ‘/uploads/’;
where do I do this?
jacmoe
(Jacob Moena)
May 31, 2017, 7:46am
3
Basic or advanced application?
Basic application -> config/params.php
jacmoe
(Jacob Moena)
May 31, 2017, 10:41am
5
Then either ‘common/config/params.php’ or ‘[frontend|backend]/config/params.php’
abilham
(Andrewbilham)
May 31, 2017, 10:58am
6
Thank you for this! I get an error when I do that…
"Notice: Trying to get property of non-object in"
jacmoe
(Jacob Moena)
June 1, 2017, 10:41am
7
You can either put some placeholder value in your params and then set them in a before filter of your upload controller action, or simply hardcode the values.