overtrue / laravel-filesystem-qiniu

A Qiniu Storage filesystem for Laravel
471 stars 35 forks source link

Trying to get property 'srcUpHosts' of non-object #10

Closed Seaony closed 6 years ago

Seaony commented 6 years ago

Laravel version: 5.5 Package version: 1.0.1 Error Message: 'Trying to get property 'srcUpHosts' of non-object' FIle path: 'qiniu/php-sdk/src/Qiniu/Config.php'

Code:

public function fetch($file, $prefix = null, $disk = null)
{
    $fileName = $this->getRandomFileName($file, $prefix);

    $storage = $this->getStorage($disk);

    $storage->put($fileName, fopen($file->getRealPath(), 'r'));

    return $storage->getUrl($fileName);
}
overtrue commented 6 years ago

https://github.com/qiniu/php-sdk/issues/254

Seaony commented 6 years ago

@overtrue thx :)