LoginSignup
1
2

More than 5 years have passed since last update.

POST送信でアップロードした画像をサーバに保存したら0kBになった件(Laravel)

Last updated at Posted at 2018-12-18

【症状】
フロント側のInputフォームからtype="file"で画像をPOST
Laravel側でstore()するも0kBのファイルが出来上がってしまう。

【結論】
php.iniでアップロードできるファイルの上限サイズが2MB等になってる。

【対策】

/etc/php.ini
upload_max_filesize = 8M

変更できたら反映させるために再起動が必要。
自分の場合はApache再起動でOKでした。

$ service httpd restart
1
2
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
1
2