图片上传大小显示超限,尽管实际更小

我想新更新中提供了一个关于修复此问题的提示,因此,以下是针对遇到相同问题的用户的完整指南……这一切都与 nginx 有关:

1. 进入 nginx 目录:

cd /etc/nginx

2. 将以下行添加到您的 nginx.conf 文件中:

http {
    ...
    client_max_body_size 4M;
}

这将允许 nginx 接受最大大小为 4 MB 的文件。

3. 重启 nginx:

  • 如果您像我一样多疑,请运行 systemctl restart nginx
  • 或者,只需运行 nginx -s reload 发送 nginx 重启信号即可