@xuda.io/drive_module 1.1.773 → 1.1.774
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 +20 -18
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2581,24 +2581,26 @@ const get_drive_doc = async function (drive_type, app_id, uid, file_path) {
|
|
|
2581
2581
|
break;
|
|
2582
2582
|
}
|
|
2583
2583
|
|
|
2584
|
-
if (doc_ret.code < 0
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2584
|
+
if (doc_ret.code < 0) {
|
|
2585
|
+
if (drive_type === "studio") {
|
|
2586
|
+
const ext = path.extname(file_name).toLowerCase();
|
|
2587
|
+
doc = {
|
|
2588
|
+
_id: file_name,
|
|
2589
|
+
docType: `${drive_type}_drive`,
|
|
2590
|
+
stat: 3,
|
|
2591
|
+
server_file_name: file_name,
|
|
2592
|
+
originalname: file_name,
|
|
2593
|
+
uid,
|
|
2594
|
+
date_created: Date.now(),
|
|
2595
|
+
ip: headers["cf-connecting-ip"],
|
|
2596
|
+
country: headers["cf-ipcountry"],
|
|
2597
|
+
file_ext: ext,
|
|
2598
|
+
is_archive: _conf.archive_drive_ext.includes(ext) ? true : false,
|
|
2599
|
+
drive_type,
|
|
2600
|
+
};
|
|
2600
2601
|
|
|
2601
|
-
|
|
2602
|
-
|
|
2602
|
+
doc.app_id = await _common.get_project_app_id(app_id);
|
|
2603
|
+
doc.app_id_reference = await _common.get_project_app_id(app_id, true);
|
|
2604
|
+
}
|
|
2603
2605
|
}
|
|
2604
2606
|
};
|