Announcement Announcement Module
Collapse
No announcement yet.
multipartResolver properties? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • multipartResolver properties?

    Hi,

    The Spring Reference Manual section 12.8.2. Using the MultipartResolver has the following.

    <bean id="multipartResolver"
    class="org.springframework.web.multipart.commons.C ommonsMultipartResolver">

    <!-- one of the properties available; the maximum file size in bytes -->
    <property name="maxUploadSize">
    <value>100000</value>
    </property>
    </bean>

    Are there more properties in addition to "maxUploadSize" for the Spring multipartResolver configuration?

    The Apache Commons File Upload docs have the following settings. Are there properties in the Spring config that can automatically set these?

    // Set upload parameters
    upload.setSizeThreshold(yourMaxMemorySize);
    upload.setSizeMax(yourMaxRequestSize);
    upload.setRepositoryPath(yourTempDirectory);

    Thanks!

  • #2
    You can subclass CommonsMultipartResolver and override newFileUpload() to fine-tune the configuration.

    Hope this helps.

    Comment

    Working...
    X