Max file upload size in Play framework 2.0
playframework-2.0
Solution
See http://www.playframework.com/documentation/2.0.x/ScalaBodyParsers
or Java version: http://www.playframework.com/documentation/2.0.x/JavaBodyParsers
extract:
// Accept only 10KB of data.
def save = Action(parse.text(maxLength = 1024 * 10)) { request =>
Ok("Got: " + text)
}
And you can configure this in your `application.conf` using `parsers.text.maxLength`.
Problem
When I upload large files (greater than 1 MB) in play framework 2.0 I get "413 Request Entity Too Large" error. Could you please anybody suggest how to get rid of this? Thanks, UPDATE I have solved this issue by adding this to application.conf #Set Max file size parsers.MultipartFormData.maxLength=10240K