Dónal
Dónal

Reputation: 187499

set the maximum allowed size of uploaded files globally

Is there a way to set the max. allowed size of uploaded files globally in a Grails application, i.e. not just for one particular request or command/domain class property?

Upvotes: 0

Views: 403

Answers (1)

Joshua Moore
Joshua Moore

Reputation: 24776

You should be able to do so by setting the maxUploadSize property for the CommonsMultipartResolver in Resources.groovy like this:

multipartResolver(org.springframework.web.multipart.commons.CommonsMultipartResolver) {
    maxUploadSize=2500000
}

Upvotes: 1

Related Questions