I can’t relate them to implement them.
I have a fully functional MVC for managing files and wanted to convert it from local storage to Azure, so I thought I could use this extension. But I can’t figure out how to implement it in the least.
In his example he defines ’ storageAzure’, but then uses ‘storage’?
In my controller, I tried
// Kartik FileInput Approach
$webFile = \yii\web\UploadedFile::getInstance($model, 'webFile');
if ($webFile !== null) {
$fileManager = Yii::$app->storageAzure->getFileManager();
$azureReponse = $fileManager->upload($webFile);
which returns 1, but there’s nothing in the Azure container.
You’ll say, that not like his example. I tried
Yii::$app->storageAzure->save($fileManager);
just like his example and get an ‘Calling unknown method’ error
Just as much as using
Yii::$app->storage->save($fileManager);
returns an ‘Unknown Property’ error.
I also looked at his example for a form field, but normally I use $model, some fieldname, and am not sure how to relate his example to the existing model/…
I’m just lost, between what is what, how it should be used in the Model vs the Controller vs the View… How to configure the variables, is it storage or azureStorage, …