Maximum upload size exceeded when saving photos in summernote

18 Views Asked by At

hi everyone i'm having problems saving photos from summernote. My project uses springboot jsp. When adding photos to summernote and pressing save, springboot displays the error "Maximum upload size exceeded". Local image size is 8MB.I tried to configure image size but it didn't work. When you add an image using the file type input box, it is saved normally. Hope to receive help from others. Thanks a lot!

spring.servlet.multipart.max-file-size=50MB
spring.servlet.multipart.max-request-size=-1
server.tomcat.max-swallow-size=-1
or
spring.servlet.multipart.max-file-size=-1
spring.servlet.multipart.max-request-size=-1
server.tomcat.max-swallow-size=-1
and

$('.summernote').summernote({ height: 350, maximumImageFileSize: 52428800 });

1

There are 1 best solutions below

0
Sunny On

Try this if it works

spring.servlet.multipart.enabled=true
spring.servlet.multipart.file-size-threshold=2KB
spring.servlet.multipart.max-file-size=200MB
spring.servlet.multipart.max-request-size=215MB