Results 1 to 2 of 2

Thread: multipartResolver properties?

  1. #1
    Join Date
    Oct 2005
    Location
    Cupertino, CA, USA
    Posts
    19

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

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

    Hope this helps.
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •