开发者

What is a good open source alternative to orielly's MultipartRequest?

开发者 https://www.devze.com 2023-01-04 04:20 出处:网络
What is a开发者_Python百科 good alternative open source library to orielly\'s MultipartRequest for handling uploaded files?Apache Commons FileUpload has become the defacto standard for this now. It\'s

What is a开发者_Python百科 good alternative open source library to orielly's MultipartRequest for handling uploaded files?


Apache Commons FileUpload has become the defacto standard for this now. It's pretty useful, has lots of options for handling larger uploads, and is used by Spring MVC as the backing implementation for this functionality.


The Apache Commons FileUpload has worked for me in the past. I believe it's what the Spring framework uses internally to handle multipart requests.


If you've made the leap to Servlet 3.0, you can annotate your servlet to support file upload.

From the spec:

File upload

If a request is of type multipart/form-data and if the servlet handling the request is annotated using the @MultipartConfig as defined in Section 8.1.5, “@MultipartConfig” on page 8-64, the HttpServletRequest can make available the various parts of the multipart request via the following methods

  • public Collection getParts()
  • public Part getPart(String name).


Is javax.mail.internet.MimeMultipart usable in this context?

0

精彩评论

暂无评论...
验证码 换一张
取 消