@xuda.io/drive_module 1.1.928 → 1.1.930
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 +6 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1696,8 +1696,8 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
};
|
|
1698
1698
|
|
|
1699
|
-
const ocr_drive_file = async function (doc) {
|
|
1700
|
-
const { drive_type,
|
|
1699
|
+
const ocr_drive_file = async function (app_id, doc) {
|
|
1700
|
+
const { drive_type, uid, file_path, originalname } = doc;
|
|
1701
1701
|
|
|
1702
1702
|
// const _region = process.env.XUDA_HOSTNAME;
|
|
1703
1703
|
let target_file = get_file_url(
|
|
@@ -1943,7 +1943,7 @@ exports.run_drive_pending_ocr = async function (req) {
|
|
|
1943
1943
|
|
|
1944
1944
|
const user_drive_res = await db_module.find_couch_query("xuda_drive", opt);
|
|
1945
1945
|
for await (let doc of user_drive_res.docs) {
|
|
1946
|
-
await ocr_drive_file(doc);
|
|
1946
|
+
await ocr_drive_file(null, doc);
|
|
1947
1947
|
}
|
|
1948
1948
|
|
|
1949
1949
|
let selector = {
|
|
@@ -1976,7 +1976,7 @@ exports.run_drive_pending_ocr = async function (req) {
|
|
|
1976
1976
|
const app_drive_res = await db_module.find_app_couch_query(app._id, opt);
|
|
1977
1977
|
for await (let doc of app_drive_res.docs) {
|
|
1978
1978
|
console.log(opt, doc);
|
|
1979
|
-
await ocr_drive_file(doc);
|
|
1979
|
+
await ocr_drive_file(app._id, doc);
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
1982
|
} catch (err) {
|
|
@@ -2661,8 +2661,8 @@ const save_drive_doc = async function (drive_type, app_id, doc) {
|
|
|
2661
2661
|
switch (drive_type) {
|
|
2662
2662
|
case "workspace":
|
|
2663
2663
|
case "studio":
|
|
2664
|
-
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
2665
|
-
save_ret = await db_module.save_app_couch_doc(
|
|
2664
|
+
// const app_id_reference = await _common.get_project_app_id(app_id);
|
|
2665
|
+
save_ret = await db_module.save_app_couch_doc(app_id, doc);
|
|
2666
2666
|
break;
|
|
2667
2667
|
|
|
2668
2668
|
case "user":
|