@xuda.io/drive_module 1.1.594 → 1.1.596
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 +8 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -622,10 +622,9 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
622
622
|
}
|
|
623
623
|
|
|
624
624
|
var target_file = path.join(req.file_path, req.file_name);
|
|
625
|
-
|
|
625
|
+
const master_id = await _common.get_project_app_id(req.app_id, true);
|
|
626
626
|
const tempPath = file_obj.path;
|
|
627
627
|
if (drive_type === "studio") {
|
|
628
|
-
const master_id = await _common.get_project_app_id(req.app_id, true);
|
|
629
628
|
const target_dir = path.join(
|
|
630
629
|
_conf[`studio_drive_path`],
|
|
631
630
|
master_id,
|
|
@@ -728,15 +727,17 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
728
727
|
if (save_ret.code < 0) {
|
|
729
728
|
return save_ret;
|
|
730
729
|
}
|
|
730
|
+
const server_file_name = `https://${
|
|
731
|
+
process.env.XUDA_HOSTNAME
|
|
732
|
+
}/${drive_type}-drive${
|
|
733
|
+
drive_type === "studio" ? `/${master_id}/${target_file}` : file_name
|
|
734
|
+
}`;
|
|
731
735
|
|
|
736
|
+
misc_module.purge_cloudflare_cache(server_file_name);
|
|
732
737
|
return {
|
|
733
738
|
code: 760,
|
|
734
739
|
data: {
|
|
735
|
-
server_file_name
|
|
736
|
-
process.env.XUDA_HOSTNAME
|
|
737
|
-
}/${drive_type}-drive${
|
|
738
|
-
drive_type === "studio" ? `/${master_id}/${target_file}` : file_name
|
|
739
|
-
}`,
|
|
740
|
+
server_file_name,
|
|
740
741
|
filename: file_obj.originalname,
|
|
741
742
|
},
|
|
742
743
|
};
|