且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 blueimp jQuery 文件上传:Struts 2 中的空文件上传结果,文件项为空

更新时间:2023-12-04 20:44:16

你可以使用 fileUpload 拦截器 来解析你的 "multipart/form-data" 请求.它使用由 commons-fileupload 实现.apache.org/maven/struts2-core/apidocs/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.html" rel="nofollow noreferrer">MultipartRequestWrapper 由 Struts2 调度程序准备操作.您可以在这里找到更多关于如何上传文件的示例.

You may use fileUpload interceptor to parse your "multipart/form-data" requests. It uses the same commons-fileupload implementation wrapped by the MultipartRequestWrapper in prepare operations by the Struts2 dispatcher. More about how to file upload with examples you could find here.