]> insang Git - ZipProject.git/commitdiff
중복 다운로드 해결
authorjoinsang <dhkq92@icloud.com>
Mon, 18 Mar 2019 11:01:20 +0000 (20:01 +0900)
committerjoinsang <dhkq92@icloud.com>
Mon, 18 Mar 2019 11:01:20 +0000 (20:01 +0900)
ZipProject/_publish/wwwroot/js/Zip/partial_zip.js
ZipProject/wwwroot/js/Zip/partial_zip.js

index f29a6a07f0b55498e8550a6cfba4333dcad8b6e6..3ec805759a20ae30ee70196bc6d8160f90f9ac4b 100644 (file)
@@ -349,12 +349,13 @@ function RequestCompress() {
     });
 
     var progress = setInterval(() => {
-        var req= $.ajax({
+        $.ajax({
           type: "post",
           url: "/webzip/fileuploadprogress",
           data: "uuid="+uuid
         }).done(function(data2) {
-          if (data2 == "-1"){
+          var iscomplate = false;
+          if (data2 == "-1" && iscomplate == false){
             clearInterval(progress);
             $(".modal").css("display", "none");
             var a = document.createElement("a");
@@ -363,8 +364,8 @@ function RequestCompress() {
             a.download = directories.get(0) + "." + format;
             a.click();
             window.URL.revokeObjectURL(url);
-            req.abort();
             $("progress").attr("value", "0");
+            iscomplate == true;
           }
           else {
             if (data2 != "-2"){
index f29a6a07f0b55498e8550a6cfba4333dcad8b6e6..3ec805759a20ae30ee70196bc6d8160f90f9ac4b 100644 (file)
@@ -349,12 +349,13 @@ function RequestCompress() {
     });
 
     var progress = setInterval(() => {
-        var req= $.ajax({
+        $.ajax({
           type: "post",
           url: "/webzip/fileuploadprogress",
           data: "uuid="+uuid
         }).done(function(data2) {
-          if (data2 == "-1"){
+          var iscomplate = false;
+          if (data2 == "-1" && iscomplate == false){
             clearInterval(progress);
             $(".modal").css("display", "none");
             var a = document.createElement("a");
@@ -363,8 +364,8 @@ function RequestCompress() {
             a.download = directories.get(0) + "." + format;
             a.click();
             window.URL.revokeObjectURL(url);
-            req.abort();
             $("progress").attr("value", "0");
+            iscomplate == true;
           }
           else {
             if (data2 != "-2"){