0

I have a multipartResolver been which looks like the following:

<bean id="multipartResolver"    
   class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    <property name="maxUploadSize" value="16777216"/>
</bean>

This gives a limit of 16 mb for file uploads, which is generally the limit I'd like to be enforced. However, for a one off scenario, I'd like to increase the limit for the file upload.

One way I can think of doing this is to make the bean configurable and raise the limit on this function call but that seems very sloppy. Is there a reasonable way to do this?

gwcoderguy
  • 392
  • 1
  • 13
  • 1
    Take a look here: https://stackoverflow.com/questions/16585866/changing-file-size-limit-maxuploadsize-depending-on-the-controller OR https://stackoverflow.com/questions/11790761/changing-commonsmultipartresolvers-maxuploadsize-during-runtime/11792952#11792952 – Rana_S Jun 23 '17 at 20:55
  • damn i'm a bad searcher... thanks! – gwcoderguy Jun 23 '17 at 21:03

0 Answers0