Grails3 file upload maxFileSize limit

Grails 3, Grails 4 and Grails 5 The solution is to set maxFileSize and maxRequestSize limits inside your application.yml file (usually placed inside grails-app/conf/). Be sure to have something like this: grails: controllers: upload: maxFileSize: 2000000 maxRequestSize: 2000000 Replace 2000000 with the number of max bytes you want for a file upload and for the … Read more

Accessing the raw body of a PUT or POST request

It is possible by overriding the HttpServletRequest in a Servlet Filter. You need to implement a HttpServletRequestWrapper that stores the request body: src/java/grails/util/http/ package grails.util.http; import; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletRequest; import javax.servlet.ServletInputStream; import*; import java.util.concurrent.atomic.AtomicBoolean; public class MultiReadHttpServletRequest extends HttpServletRequestWrapper { private byte[] body; public MultiReadHttpServletRequest(HttpServletRequest httpServletRequest) { super(httpServletRequest); // Read the request … Read more

Grails unable to install plugin

The repository changed and it’s causing problem for older Grails versions. See my answer at: Grails Url shortener plugin not getting installed : Please use mavenRepo “” As a repository definition.