LoginSignup
0
1

More than 1 year has passed since last update.

The PutObject operation requires non-empty parameterのエラー対応について

Last updated at Posted at 2021-09-11

下記の記事を参考にs3へ画像を保存する途中でThe PutObject operation requires non-empty parameterのエラーが出たのでその対処法です。

参考にした記事

確認手順

上記記事を参考にcomposerで必要なものを入れたりバケットを作ったり.envを書き換えます。

その後、

php artisan config:cache
もしくは
php artisan cache:clear

を実行

  1. config/filesystems.phpの設定確認
  2. disk arrayのs3の部分を見る
  3. .envと比較して.envをきちんと反映しているか確認

スクリーンショット 2021-09-12 0.44.06.png

  1. 実行してみて下記でデバック
MainController.php
use Config;

省略----

dd(Config::get('filesystems'));

スクリーンショット 2021-09-12 0.59.23.png

s3の部分が反映されていない場合にはconfig/filesystems.phpに直接記入してみて動けばcacheがうまく消えていない可能性が高いです。

感想

自分は古いcacheがうまく消えていなかったのが問題でした。
php artisan cache:clearだけではうまく消えないらしくphp artisan config:cacheを打つとうまく反映されました

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1