@xuda.io/drive_module 1.1.1356 → 1.1.1358
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.mjs +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -278,7 +278,7 @@ export const get_drive_files = async (req) => {
|
|
|
278
278
|
opt.selector.docType = 'user_drive';
|
|
279
279
|
opt.selector.uid = uid;
|
|
280
280
|
const ret = await db_module.find_couch_query('xuda_drive', opt);
|
|
281
|
-
const file_doc = await
|
|
281
|
+
const file_doc = await get_user_drive_file(uid, path.basename(file_path) || '/');
|
|
282
282
|
return {
|
|
283
283
|
code: 1,
|
|
284
284
|
data: await fetch_drive_files(ret, file_doc, null, uid),
|
|
@@ -637,7 +637,7 @@ export const update_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
637
637
|
case 'user': {
|
|
638
638
|
ref = uid;
|
|
639
639
|
doc.bucket[`${process.env.XUDA_HOSTNAME}`] = await upload_file_to_spaces(tempPath, uid, drive_type, file_name);
|
|
640
|
-
save_ret = await
|
|
640
|
+
save_ret = await save_user_drive_file(uid, doc);
|
|
641
641
|
break;
|
|
642
642
|
}
|
|
643
643
|
default:
|
|
@@ -1359,7 +1359,7 @@ const ocr_drive_file = async (app_id, doc) => {
|
|
|
1359
1359
|
try {
|
|
1360
1360
|
doc.ocr_stat = 2;
|
|
1361
1361
|
doc.ocr_stat_date = Date.now();
|
|
1362
|
-
save_ret = await save_drive_doc(drive_type, app_id, doc, file_path);
|
|
1362
|
+
save_ret = await save_drive_doc(drive_type, uid, app_id, doc, file_path);
|
|
1363
1363
|
|
|
1364
1364
|
doc = await get_drive_doc('file', drive_type, app_id, uid, path.join(file_path, originalname));
|
|
1365
1365
|
|