我想上传大量图像文件(最大大小 10mb),因为我正在使用以下配置struts.xml
<interceptors>
<interceptor-stack name="fileUploadStack">
<interceptor-ref name="exception" />
<interceptor-ref name="alias" />
<interceptor-ref name="servletConfig" />
<interceptor-ref name="prepare" />
<interceptor-ref name="i18n" />
<interceptor-ref name="chain" />
<interceptor-ref name="debugging" />
<interceptor-ref name="profiling" />
<interceptor-ref name="scopedModelDriven" />
<interceptor-ref name="modelDriven" />
<interceptor-ref name="fileUpload">
<param name="maximumSize">10485760</param>
<param name="allowedTypes">image/jpg,image/jpeg,image/gif,image/png,image/pjpeg</param>
</interceptor-ref>
<interceptor-ref name="checkbox" />
<interceptor-ref name="staticParams" />
<interceptor-ref name="actionMappingParams" />
<interceptor-ref name="params">
<param name="excludeParams"> dojo\..*,^struts\..*</param>
</interceptor-ref>
<interceptor-ref name="conversionError" />
<interceptor-ref name="validation">
<param name="excludeMethods"> input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods"> input,back,cancel,browse</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
<action name="ownmessageswithimage" class="social.action.UserMessages" method="insertImage">
<result name="success">/pages/profile/userSingleMessage.jsp</result>
<result name="input">/pages/errorpages/ajaxError.jsp</result>
<result name="login">/pages/pleaselogin.jsp</result>
</action>
编辑:这是我的jsp文件代码
<script type="text/javascript" src="js/jquery.form.js"></script>
<form id="own_message_post" action="ownmessageswithimage" method="post">
<input id="fileupload" type="file" name="user_post_image" data-url="ownmessages" />
<textarea name="message" rows="4" cols="45" id="text_message_status"
></textarea><br>
<input type="submit" value="Post" id="submit_form_button"
style="background:#004091;padding: 2px 20px 2px 20px;color: whitesmoke;font-weight: bold" />
</form>
<script type="text/javascript">
$('#own_message_post').ajaxForm(function(data) {
$('#fileupload').val("");
});
</script>
我正在使用 malsup 异步文件上传脚本但问题是它没有上传高达 10 mb 的大文件。如何使它成为可能。