2016-02-16 58 views
0

我已經使用yii2-file-kit。現在我想通過滑行來調整我的縮略圖,但I'be日誌如何使用Yii2 Glide

"NetworkError: 500 Internal Server Error - http://storage.local/cache/1/iApQj79NQCji2TWsLZppiCQ8lbdgAPBz.jpg?w=100" 

這裏得到的錯誤是我的配置

'components' => [ 
    'cache' => [ 
     'class' => 'yii\caching\DummyCache', 
    ], 
'fileStorage' => [ 
     'class' => '\trntv\filekit\Storage', 
     'baseUrl' => '@storageUrl/source', 
     'filesystem' => [ 
      'class' => 'common\components\filesystem\LocalFlysystemBuilder', 
      'path' => '@storage/web/source' 
     ], 
     'as log' => [ 
      'class' => 'common\behaviors\FileStorageLogBehavior', 
      'component' => 'fileStorage' 
     ] 
    ], 

    'glide' => [ 
     'class' => 'trntv\glide\components\Glide', 
     'sourcePath' => '@storage/web/source', 
     'cachePath' => '@storage/cache', 
     'urlManager' => 'urlManagerStorage', 
     'maxImageSize' => 4000000, 
     'signKey' => 'pe4AJmRcBFbXfZvsk93VN' 
    ], 

在我看來

<?= Html::img(
      Yii::$app->glide->createSignedUrl([ 
       'glide/index', 
       'path' => $model->productAttachments[0]->path, 
       'w' => 100 
      ], true), 
      ['class' => 'article-thumb img-rounded pull-left'] 
     ) ?> 

我只是看在Starter-Kit配置中,有和我所看到的相同的配置。存儲配置與yii2-starter-kit相同

回答

0

可以顯示調試以獲取更多信息。或者你可以輸出圖像 Url :: base(true)。'/ glide?path ='。$ path。' & w ='。$ w。' & h ='。$ h。' & fit = crop';