lsc 3 nedēļas atpakaļ
vecāks
revīzija
517d4f7f4d
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      pbl.js

+ 10 - 0
pbl.js

@@ -926,6 +926,16 @@ 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);
+                })
+            ));
+            
             // 使用 Promise.all 确保所有添加操作都被执行
             await Promise.all(documentids.map(documentid =>
                 client.collections.addDocument({