lsc 3 weeks ago
parent
commit
739315f7a5
1 changed files with 8 additions and 8 deletions
  1. 8 8
      pbl.js

+ 8 - 8
pbl.js

@@ -930,14 +930,14 @@ router.route("/getGraphs").all(async (req, res, next) => {
             //将要提取的文件添加到临时文件夹
             let documentids = decodeURIComponent(req.body[0].fileids).split(",");
 
-            // await Promise.all(documentids.map(documentid =>
-            //     client.documents.extract({
-            //         id: documentid,
-            //         runWithOrchestration: false
-            //     }).catch(error => {
-            //         console.error("提取文件发生错误:", error);
-            //     })
-            // ));
+            await Promise.all(documentids.map(documentid =>
+                client.documents.extract({
+                    id: documentid,
+                    runWithOrchestration: false
+                }).catch(error => {
+                    console.error("提取文件发生错误:", error);
+                })
+            ));
             
             // 使用 Promise.all 确保所有添加操作都被执行
             await Promise.all(documentids.map(documentid =>