bug articles - upload image size limit configuration

I. Description of the problem

  Today test upload pictures to Ali cloud server, call springboot background map interface to upload long in the front vue, found no access to the interface, it may have been springboot blocked it.

Second, explain the reasons

  Springboot engineering principles agreed to start is greater than the configuration in which the conventions embedded tomcat configuration limits the size of the requested file is 1MB. If you upload a file larger than the configured value, an exception will be reported The field file exceeds its maximum permitted size of 1048576 bytes.

Third, the problem is solved

  Configuration of the application.yml springboot

spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB

Guess you like

Origin www.cnblogs.com/zzb-yp/p/11696554.html