使用struts2寻找ajax多重上传解决方案
我们的团队希望在 struts2 中支持多个并发上传(即“ajaxy”、gmail 风格的文件上传,带有进度条, 立即开始,而不是在用户提交表单时开始)。
我们想知道是否有任何提示或最佳实践 实现此功能。例如,struts 是否需要任何 对 XHR 多部分请求的特殊处理?还有,合适吗 使用 FileUploadInterceptor 来做这类事情,或者是 最好自己推出?
我们简要介绍了 ajax-file-upload-struts2 但它看起来像 尽管该项目要么被放弃,要么不完整(如果这是错误的) 请告诉我)。
至于客户端,我们研究了 swfupload、plupload 和 上传。他们似乎有不同的优点/缺点,但是 如果有人找到了他们喜欢的解决方案,我们很乐意听到 它。
Our team is looking to support multiple concurrent uploads in struts2 (i.e. "ajaxy", gmail-style file uploads, with progress bars, that
begin immediately instead of when the user submits the form).
We are wondering if there are any tips or best practices for
implementing this feature. For example, does struts require any
special handling for XHR multipart requests? Also, is it appropriate
to use the FileUploadInterceptor for this sort of thing, or is it
better to roll our own?
We've briefly looked at ajax-file-upload-struts2
but it looks as
though that project is either abandoned or incomplete (if that's wrong
please let me know).
As for the client side, we've looked at swfupload, plupload, and
uploadify. They seem to have their various strengths/weaknesses but
if anyone has a found a solution that they prefer we'd love to hear
it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Struts2 已经提供了多个文件上传功能,而且它本身就是一个很好的功能,因为它为您完成了所有基础工作。我相信自己做就意味着再次做同样的工作。
您可以查看多个文件上传实现的当前实现,并可以根据您的要求进行调整
这是使用struts2进行多文件上传的官方文档
多文件上传
Struts2 already provides multiple file uploads functionality and its a good one in its own since its doing all the underlying work for you.i believe doing yourself means again doing the same work.
you can have look at current implementation of multiple file upload implementation and can tweak it as per your requirements
here is official document for the multiple file upload using struts2
Multiple File Uploads