Overriding default multipart file size in Openmrs module dev

Hi,

With the mergepatientdata module, you can export a good number of patient and encounter, I dowloaded over 2000+ patients with their encounter and these made up a file of around 89mbs, on trying to upload this file file to another server, I hit upon this

 org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size of 75000000 bytes exceeded; nested exception is org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException

I thought by default the spring multipart system has no limit!

However, I tried to override this by adding this bean in my webModuleApplicationContext.xml

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

I expect that to set it to an infinite value but actually this doesn’t work :flushed:

Could I be missing something?

cc: @wyclif , @dkayiwa

Did you eventually decide to use a different approach?

I had not taken any progress on this, I was still caught up in the ‘box’. Just created a ticket to address that. Could be thats the first ticket I will handle this week.

@dkayiwa, @ssmusoke

@samuel

have you tried to use a bigger value within property?

Yes @herbert24 :smile:

@samuel34

i was having the same error some day and putting a bigger value under property solved my problem

Were you dealing with an openmrs module? @herbert24

can i post you some thing get on irc

Just can’t see you there. You could want to share from this thread @herbert24