LoginSignup
10
10

More than 5 years have passed since last update.

Play2.4、nginxを使ったファイルアップロードでのファイルサイズ上限設定

Posted at

Playframework2.4のファイルアップロードで、
10MB以上の大きいサイズのファイルを上げようとしたら下記のエラーがでたので、
その解決方法をメモ。

413 Request Entity Too Large

解決するためには以下を設定。

nginx側

/etc/nginx/nginx.conf
client_max_body_size 50m; // ex. 50MBの場合

Playframework側

application.conf
play.http.parser.maxDiskBuffer=50MB // ex. 50MBの場合

※デフォルトが10MBとなっているようです。
そしてPlay2.3まではparsers.MultipartFormData.maxLength=50MBだったようです。

参考

10
10
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
10
10