@xuda.io/drive_module 1.1.777 → 1.1.779
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 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2560,7 +2560,7 @@ const get_drive_doc = async function (
|
|
|
2560
2560
|
);
|
|
2561
2561
|
|
|
2562
2562
|
let doc_ret;
|
|
2563
|
-
|
|
2563
|
+
let doc;
|
|
2564
2564
|
switch (drive_type) {
|
|
2565
2565
|
case "studio": {
|
|
2566
2566
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
@@ -2599,8 +2599,8 @@ const get_drive_doc = async function (
|
|
|
2599
2599
|
originalname: file_name,
|
|
2600
2600
|
uid,
|
|
2601
2601
|
date_created: Date.now(),
|
|
2602
|
-
ip: headers["cf-connecting-ip"],
|
|
2603
|
-
country: headers["cf-ipcountry"],
|
|
2602
|
+
ip: headers?.["cf-connecting-ip"],
|
|
2603
|
+
country: headers?.["cf-ipcountry"],
|
|
2604
2604
|
file_ext: ext,
|
|
2605
2605
|
is_archive: _conf.archive_drive_ext.includes(ext) ? true : false,
|
|
2606
2606
|
drive_type,
|
|
@@ -2611,7 +2611,9 @@ const get_drive_doc = async function (
|
|
|
2611
2611
|
} else {
|
|
2612
2612
|
throw new Error("file doc not found");
|
|
2613
2613
|
}
|
|
2614
|
+
} else {
|
|
2615
|
+
doc = doc_ret.data;
|
|
2614
2616
|
}
|
|
2615
2617
|
|
|
2616
|
-
return
|
|
2618
|
+
return doc;
|
|
2617
2619
|
};
|