0

I am using https://github.com/creocoder/yii2-flysystem in a Yii2 application. I have set the following in the config

    'azureFs' => [
        'class' => 'creocoder\flysystem\AzureFilesystem',
        'accountName' => 'mystorageacctname',
        'accountKey' => 'its-really-long-alphanumeric-special-char-key',
        'container' => 'pathforstorage',
    ],

And in my controller, I am calling the following

    if($file = UploadedFile::getInstanceByName('uploaddocs'))
    {
        $stream = fopen($file->tempName, 'r+');
        Yii::$app->azureFs->writeStream($fpath. $fname, $stream);
    }

However, I get this error:

InvalidArgumentException Provided URL is invalid.

I have installed all dependencies as well. I am not sure where I am going wrong.

sabkaraja
  • 342
  • 4
  • 15
  • Where is the URL being set and what is it being set to? – Brody Apr 28 '16 at 21:31
  • The yii2 filesystem plugin doesnt say anything about setting url. These are the only parameters. However I can see that in the exception, it gives a gibberish url something like https://abckellwne==.file.core.windows.net (if you notice the == in the url is causing the problem. I think it should just take the accountname and prefix it instead of the hash) – sabkaraja Apr 29 '16 at 09:52

0 Answers0