|
@@ -926,6 +926,16 @@ router.route("/getGraphs").all(async (req, res, next) => {
|
|
|
|
|
|
//将要提取的文件添加到临时文件夹
|
|
//将要提取的文件添加到临时文件夹
|
|
let documentids = decodeURIComponent(req.body[0].fileids).split(",");
|
|
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 确保所有添加操作都被执行
|
|
// 使用 Promise.all 确保所有添加操作都被执行
|
|
await Promise.all(documentids.map(documentid =>
|
|
await Promise.all(documentids.map(documentid =>
|
|
client.collections.addDocument({
|
|
client.collections.addDocument({
|