Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limiting upload size in Play Framework 2.2

In Play Framework you could limit upload size by adding:

parsers.MultipartFormData.maxLength=[limit]

in application.conf. But it doesn't seem to work with current version of Play Framework. How do I do this in 2.2 version?

like image 766
szymond Avatar asked Dec 03 '25 22:12

szymond


1 Answers

In Play 2.2

parsers.text.maxLength=[limit]

https://www.playframework.com/documentation/2.2.x/ScalaBodyParsers#Max-content-length

In Play 2.4

play.http.parser.maxDiskBuffer=[limit]

https://www.playframework.com/documentation/2.4.x/ScalaBodyParsers#Max-content-length

like image 187
turutosiya Avatar answered Dec 06 '25 22:12

turutosiya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!