Hello,
I am migrating my project to Play 2.5.
Previous I had defined a maximum upload size for a MultipartFormData with:
@BodyParser.Of(value = BodyParser.MultipartFormData.class, maxLength = 5 * 1024 * 1024)
In play 2.5 from the documentation, I see that the correct why is now an extend
like so:
public static class Json300Kb extends BodyParser.Json {
@Inject
public Json300Kb(HttpErrorHandler errorHandler) {
super(300 * 1024, errorHandler);
}
}
But MultipartFormData does not seem to have a way to define the maxLenght in the constructor
What is the correct away to achieve this in play 2.5 without defining it globally in the config file?