Grails - upload image too large problem handling

    The default size of images uploaded by Grails is 125KB (128000). If the size is exceeded, an exception will be reported.

 

HTTP Status 500 - Request processing failed;
nested exception is org.springframework.web.multipart.MultipartException:
Could not parse multipart servlet request;
nested exception is java.lang.IllegalStateException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (435414) exceeds the configured maximum (128000)

 

     In Grails Version 3.1.10, you can upload large files by configuring the upload parameter in application.yml.

 

controllers:
        defaultScope: singleton
        upload:
          maxFileSize: 10485760
          maxRequestSize: 10485760

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326479607&siteId=291194637