var frame; $("#add_file").fileinput({ language: 'zh', uploadUrl: '/' + url + '/uploadFile', showUpload: false, showCaption: false, uploadAsync: true, removeFromPreviewOnError: true, dropZoneEnabled: true, dropZoneTitle: '拖拽文件到这里 …<br>只支持单文件上传', maxFileCount: 100, maxFileSize: 0, uploadExtraData: function (previewId, index) { var obj = { xb2: $("#xb2").val(), yewuId: $("#yewuId").val(), algType: $("#algType").find("option:selected").text(), fileType: $("#fileType").find("option:selected").text(), col1: $("#col1").val(), col2: $("#col2").val(), col3: $("#col3").val(), col4: $("#col4").val(), magor: $("#magor").html(), }; return obj; } }).on("filebatchselected", function(event, files) { frame = files[0] });
frame = document.getElementById('add_file').files[0];
formData = new FormData(); formData.append('file', blob); formData.append('fileName', file.name); formData.append('part', part); formData.append('guid', uid); $.ajax({ url: Hussar.ctxPath + "/testTasks/doUploadDatas", type: 'POST', cache: false, data: formData, processData: false, contentType: false, success(){}, error(){} })
|