2016-02-16 1 views
0

J'utilise déjà yii2-file-kit. Et maintenant, je veux redimensionner ma miniature en vol plané, mais I'be eu erreur dans le journalComment puis-je utiliser Yii2 Glide

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

Voici ma config

'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' 
    ], 

Et à mon avis

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

Je viens de regarder à la configuration Starter-Kit et il y a la même config que je vois. La configuration du stockage est la même que celle de yii2-starter-kit

Répondre

0

Pouvez-vous afficher le débogage pour plus d'informations. Ou vous pouvez sortir l'image par Url :: base (true). '/ Glide? Path ='. $ Path. ' & w = '. $ W.' & h = '. $ H.' & fit = recadrer ';