1jQuery(function ($) { 2 $("#csvImportForm").submit(function (e) { 3 e.preventDefault(); 4 var formData = new FormData(this); 5 formData.append("action", "import_tender_csv"); 6 $("#import-progress").html("Uploading..."); 7 8 $.ajax({ 9 url: tender_ajax.ajaxurl, 10 type: "POST", 11 data: formData, 12 processData: false, 13 contentType: false, 14 xhr: function () { 15 var xhr = new window.XMLHttpRequest(); 16 xhr.upload.addEventListener( 17 "progress", 18 function (e) { 19 if (e.lengthComputable) { 20 var percent = Math.round((e.loaded / e.total) * 100); 21 $("#import-progress").html( 22 "Uploading : " + percent + "%" 23 ); 24 } 25 }, 26 false 27 ); 28 return xhr; 29 30 }, 31 success: function (response) { 32 if (response.success) { 33 $("#import-progress").html( 34 "<h3>Import Completed</h3>" + 35 "<b>Total :</b> " + response.data.total + "<br>" + 36 "<b>Imported :</b> " + response.data.imported + "<br>" + 37 "<b>Skipped :</b> " + response.data.duplicate 38 ); 39 } else { 40 $("#import-progress").html(response.data); 41 } 42 } 43 }); 44 }); 45});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.