I am using Spring MVC3 to handle file upload for my web application. For now, I can restrict the file size being uploaded using the following configuration defined in my xml context file:

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

I have scoured the web for how to restrict the file type but to no avail. Most of the articles I found only teach how to restrict the file size not the file type. Thank in advance for your help.

Edit
Report