From 962519811b7c4be07f30d09e791798b0ea79d3ae Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 08 三月 2023 09:54:02 +0800
Subject: [PATCH] 同步代码

---
 force-app/main/default/aura/eSignAgencyPage/eSignAgencyPageHelper.js |   48 +++++++++++++++++++++++++-----------------------
 1 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/force-app/main/default/aura/eSignAgencyPage/eSignAgencyPageHelper.js b/force-app/main/default/aura/eSignAgencyPage/eSignAgencyPageHelper.js
index 3327a7b..dc8810e 100644
--- a/force-app/main/default/aura/eSignAgencyPage/eSignAgencyPageHelper.js
+++ b/force-app/main/default/aura/eSignAgencyPage/eSignAgencyPageHelper.js
@@ -799,7 +799,7 @@
     },
 
     MAX_FILE_SIZE: 4608000, //Max file size 4.5 MB
-    CHUNK_SIZE: 750000, //Chunk Max size 750Kb
+    CHUNK_SIZE: 750000, //Chunk Max size 750Kb //2023-03-07 zhj 涔嬪墠鏄�750000
     uploadHelper: function(component, event) {
         // start/show the loading spinner
         component.set("v.showLoadingSpinner", true);
@@ -807,6 +807,7 @@
         var fileInput = component.find("fileId").get("v.files");
         // get the first file using array index[0]
         var file = fileInput[0];
+        console.log('file.size 寮�濮� = ' + file.length);
         //var test = this.compress(file);
         var self = this;
         var pdf = file.type;
@@ -952,19 +953,20 @@
                     fileContents.length,
                     startPosition + this.CHUNK_SIZE
                 );
-                if (startPosition < endPosition) {
-                    this.uploadInChunk(
-                        component,
-                        file,
-                        fileContents,
-                        startPosition,
-                        endPosition,
-                        ''
-                    );
-                }
+                // if (startPosition < endPosition) {
+                //     this.uploadInChunk(
+                //         component,
+                //         file,
+                //         fileContents,
+                //         startPosition,
+                //         endPosition,
+                //         ''
+                //     );
+                // }
                 let staticResource = component.get('v.staticResource');
                 var reader = new FileReader();
-                reader.readAsDataURL(file.slice(0, endPosition));
+                console.log('file.size 璋冪敤 = ' + file.length);
+                reader.readAsDataURL(file);
                 var that = this;
                 reader.onloadend = function(evt){
                     if(evt.target.readyState == FileReader.DONE){
@@ -1117,19 +1119,19 @@
                 fileContents.length,
                 startPosition + this.CHUNK_SIZE
             );
-            if (startPosition < endPosition) {
-                this.uploadInChunk(
-                    component,
-                    file,
-                    fileContents,
-                    startPosition,
-                    endPosition,
-                    ''
-                );
-            }
+            // if (startPosition < endPosition) {
+            //     this.uploadInChunk(
+            //         component,
+            //         file,
+            //         fileContents,
+            //         startPosition,
+            //         endPosition,
+            //         ''
+            //     );
+            // }
             let staticResource = component.get('v.staticResource');
             var reader = new FileReader();
-            reader.readAsDataURL(file.slice(0, endPosition));
+            reader.readAsDataURL(file);
             var that = this;
             reader.onloadend = function(evt){
                 if(evt.target.readyState == FileReader.DONE){

--
Gitblit v1.9.1