画像アップロードサイズが超過と表示されるが、実際は小さい

Hi

Max size is set to 4 mb:

But when I upload a photo like this (around 2 mb), I get a message saying that it exceeds the 4 mb limit:

Is it a bug or am I missing something?

  • I’m running on 2.4.0.beta6

Did you restart your discourse instance after changing that setting?

「いいね!」 2

I just tried this now with:

./launcher stop app
./launcher start app

And it still shows the same error, could this be related with S3 being used with Discourse?

「いいね!」 1

この問題を解決するためのヒントが新しいアップデートに含まれていたようです。同じ問題に直面している方のために、完全なガイドを以下に示します。すべて nginx に関するものです。

1. nginx フォルダに移動します:

cd /etc/nginx

2. nginx.conf ファイルに以下の行を追加します:

http {
    ...
    client_max_body_size 4M;
}

これにより、nginx は最大 4 メガバイトのファイルを受け付けるようになります。

3. nginx を再起動します:

  • 私のように慎重な場合は、systemctl restart nginx を実行してください
  • または、nginx -s reload を実行して nginx の再起動シグナルを送信するだけで済みます
「いいね!」 2

このトピックは 26 時間後に自動的に閉鎖されました。新しい返信は許可されていません。