@xuda.io/drive_module 1.1.566 → 1.1.567
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -19
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1587,35 +1587,23 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1587
1587
|
});
|
|
1588
1588
|
if (user_drive_res.docs.length) {
|
|
1589
1589
|
return {
|
|
1590
|
-
code: -
|
|
1591
|
-
data: "file
|
|
1590
|
+
code: -764,
|
|
1591
|
+
data: "file exist",
|
|
1592
1592
|
duplicates: user_drive_res.docs,
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
1595
1595
|
|
|
1596
|
-
ref = uid;
|
|
1597
|
-
file_name =
|
|
1598
|
-
"drv_" + ref + "_" + (await _common.xuda_get_uuid(drive_type)) + ext;
|
|
1599
|
-
|
|
1600
|
-
doc.server_file_name = file_name;
|
|
1601
|
-
|
|
1602
|
-
doc.bucket = {
|
|
1603
|
-
[`${process.env.XUDA_HOSTNAME}`]: await upload_file_to_spaces(
|
|
1604
|
-
tempPath,
|
|
1605
|
-
ref,
|
|
1606
|
-
drive_type,
|
|
1607
|
-
file_name
|
|
1608
|
-
),
|
|
1609
|
-
};
|
|
1610
|
-
doc._id = file_name;
|
|
1611
|
-
save_ret = await db_module.save_couch_doc("xuda_drive", doc);
|
|
1612
|
-
misc_module.rsync_drive_resources_to_remote_servers("user", uid);
|
|
1613
1596
|
break;
|
|
1614
1597
|
}
|
|
1615
1598
|
|
|
1616
1599
|
default:
|
|
1617
1600
|
break;
|
|
1618
1601
|
}
|
|
1602
|
+
|
|
1603
|
+
return {
|
|
1604
|
+
code: 764,
|
|
1605
|
+
data: "ok",
|
|
1606
|
+
};
|
|
1619
1607
|
};
|
|
1620
1608
|
const ocr_drive_file = async function (doc) {
|
|
1621
1609
|
const { drive_type, target_file } = doc;
|