var formData = new FormData();
formData.append("myfile", document.getElementById("file1").files[0]);
formData.append('progress',$(".progress_status").val());
$.ajax({
type: 'post',
url: "*****",
data: formData,
cache: false,
processData: false,
contentType: false,
}).success(function (data) {
if(data.status == "ok") {
swal({
title: "添加成功!",
text: " ",
type: "success",
timer: 800,
showConfirmButton: false
});
$("#addDoc_templete").modal("hide");
load_doc_list();
} else if (data.status == "exist") {
swal({
title: data.msg,
type: "warning",
timer: 2000,
showConfirmButton: false
});
} else if (data.status == "error") {
swal({
title: data.msg,
type: "error",
timer: 2000,
showConfirmButton: false
});
}
});