@xuda.io/drive_module 1.1.772 → 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.
Files changed (2) hide show
  1. package/index.js +23 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2580,4 +2580,27 @@ const get_drive_doc = async function (drive_type, app_id, uid, file_path) {
2580
2580
  default:
2581
2581
  break;
2582
2582
  }
2583
+
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
+ };
2601
+
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
+ }
2605
+ }
2583
2606
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.772",
3
+ "version": "1.1.774",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {