使用Struts2 上传 zip rar
使用的 MIME:
<interceptor-ref name="fileUpload">
<param name="allowedTypes">application/zip,application/x-zip-compressed,application/rar,application/octet-stream</param>
<param name="maximumSize">3145728</param>
</interceptor-ref>
通过Debug FileUploadInterceptor可知,
zip文件是[application/x-zip-compressed]
rar是[application/octet-stream]