devpia.dextuploadnj.support.spring
Class DEXTUploadNJMultipartResolver
- Minimum version supported
- 1.0.0
- Minimum support environment
- JRE 1.6, Spring Framework
- Description
-
This class handles multipart requests.
The DEXTUploadNJMultipartResolver class implements the org.springframework.web.multipart.MultipartResolver, org.springframework.web.context.ServletContextAware interface and is used instead of the org.springframework.web.multipart.commons.CommonsMultipartResolver class.
The setting is as follows.
<bean id="environment" class="devpia.dextuploadnj.Environment"> <property name="tempRepository" value="the directory path to create temporary files"/> <property name="defaultRepository" value="the default directory path to save files"/> <property name="maxFileSize" value="maximum size of individual files limited"/> <property name="maxTotalSize" value="maximum total size limit"/> <property name="autoMakingDirectory" value="whether automatic generation of directory"/> <property name="whiteExtensions" value="the list of file extensions to allow"/> <property name="filterAction" value="the method of handing filtered files"/> <property name="compact" value="whether it goes through a meaningless file"/> <property name="charEncoding" value="UTF-8"/> <property name="socketInputStreamReadBufferSize" value="the buffer size of the upload stream"/> <property name="streamReadRetryCount" value="the number of retries to read the stream"/> <property name="fileCopyOption" value="the method of copyging file"/> <property name="fileCopyBufferSize" value="the buffer size of the copying file"/> <property name="maxFileSize" value="the maximum allowed size(byte) of each file"/> <property name="maxTotalSize" value="the maximum allowable size(byte) of all files"/> <property name="loosely" value="whether the level of analyzing the multi-part data is low"/> <property name="licenseFilePath" value="the path of the License file"/> <property name="licenseConfigXmlPath" value="the path of the License management XML file"/> <property name="licenseAuthKey" value="cfHzOu ... authentication key string ... rPTl1P"/> </bean> <bean id="multipartResolver" class="devpia.dextuploadnj.support.spring.DEXTUploadNJMultipartResolver"> <property name="environment" ref="environment"/> </bean>
The DEXTUploadNJMultipartResolver object is responsible for separating the form data and generating temporary files in the tempRepository location. After that, it is necessary to describe the code to be processed with the method mapped to the controller, since the implementation method differs depending on the service, since it is necessary to move and copy the temporary file to the place where it is actually saved.