otale / tale

🦄 Best beautiful java blog, worth a try

Home Page:https://tale.biezhi.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ubuntu 16.04、18.04、18.10 fileUpLoad will be 500(ubuntu环境文件上传失败,已解决)

krscuti opened this issue · comments

这个是18.10的 先贴上,我去找找答案

<title>413 Request Entity Too Large</title>

413 Request Entity Too Large


nginx/1.15.5 (Ubuntu)

一开始是因为图片太大了,maxbody 肯定是有默认值的把。在添加完client_max_body_size 100M;后

image

文件其实是上传了
没有正确返回咩。
image

Image img = ImageIO.read(imageFile)
写入文件后判断是否是图片文件,读取失败

修改成
image
就可以了,
image
ok ,大功告成

但是代码文章不能保存还是没解决/。