I can define a MultipartResolver
like this with a maxUploadSize
of 10K (10000 bytes):
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="10000"/>
</bean
However, if the admin needs to upload some large files via the admin interface which exceed this limit, the app needs to be temporarily re-configured to allow this - and then re-configured again to make sure regular users don't exceed this limit.
While this is happening, of course, a regular user could potentially sneak a large file in without receiving a warning.
Is there a way to configure the resolver to use a different maxUploadSize
in these two situations?