To implement a file upload function in the project, please tell me how to implement it through Jq
仅有的幸福2017-05-18 10:57:05
jquery-plugins upload-1-jq. There are too many written plug-ins like this on the Internet.
我想大声告诉你2017-05-18 10:57:05
uoloadify, this is used in company projects. It is recommended to use the latest version. Our company's backend has to use the old version. As a result, we have to write a lot of things ourselves, which is annoying.
uploadify is divided into two versions: swf and H5. The H5 version is charged, and the swf version has good compatibility
大家讲道理2017-05-18 10:57:05
Just use jquery.form.js
https://github.com/jquery-for...
$('#form').ajaxSubmit({
url : '${ctx}/file/upload',
data : {
},
dataType : 'json',
success : function(data) {
},
error : function(data) {
}
});
<form id="form" method="post" novalidate enctype="multipart/form-data">
<input name="file" type="file" />
</form>