jQuery upload plugin to work with JSP/Java

爷,独闯天下 提交于 2019-12-07 22:28:19

问题


I'm trying to accomplish the following:

Upload a file to the application by submitting a form (enctype: multipart/form-data) to a JSP action which handles the rest (including writing the file to the disk, processing and returning some xml data about the upload).

Until recently, I was using this plugin: http://valums.com/ajax-upload/

This does not work well for two reasons:

  • it breaks on Internet Explorer
  • the code is written in half jquery, half native javascript and not in your usual plugin authoring form, which makes it harder to debug.

I've also looked at Uploadify ( http://www.uploadify.com/ ) but it takes a radically different approach which would require a lot of back-end changes.

Do you know any similar submit-form-in-hidden-iframe plugins that are cleaner / cross-browser compatible? Or alternative solutions that I'm missing?

Please note that I can't use a regular because of the specific requirements.

Thanks.


回答1:


You can try:

https://github.com/blueimp/jQuery-File-Upload

Pretty nice & simple




回答2:


It's not jQuery but this is quite nice.

http://digitarald.de/project/fancyupload/

Also YUI has an uploader.




回答3:


I've had success with this one:

http://malsup.com/jquery/form/




回答4:


Allthough this is not a JQuery plugin, I can recommand SwfUpload for this kind of functionality. It's a combination of Flash and javascript which allowed me to do exactly what I wanted to without having to worry about the "upload"-part.




回答5:


Try jqUploader : it's written in pure jquery plugin style and uses a flash file to display a progress bar. Very easy to implement.




回答6:


You may try: plupload. It's back-end independent, and cross-browser.



来源:https://stackoverflow.com/questions/1171953/jquery-upload-plugin-to-work-with-jsp-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!