If you're using spring cloud, then you're going to have to change the settings.
When the server is Tomcat, the maximum size of the file uploaded via post is 2M (2097152).
If you want to modify the limit, modify the method as follows:
Under the Conf folder under the Tomcat directory, add the Maxpostsize parameter to the Server.xml file in the following location
<connector port= "8081" maxthreads= "minsparethreads=" "maxsparethreads=" "enablelookups="
false "Redirectport=" 8443 "acceptcount="
debug= "0" connectiontimeout= "20000" disableuploadtimeout= "
true" uriencoding= "Utf-8"
maxpostsize= "0"/>
When maxpostsize<=0, the file size that is uploaded by post is not limited.
Note: The Maxpostsize parameter works only if the request's Content-type is "application/x-www-form-urlencoded". Reference Link: http://stackoverflow.com/questions/7696197/tomcat-maxpostsize-value-ignored-with-xmlhttprequest