@xuda.io/drive_module 1.1.589 → 1.1.591
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 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -625,11 +625,12 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
625
625
|
|
|
626
626
|
const tempPath = file_obj.path;
|
|
627
627
|
if (drive_type === "studio") {
|
|
628
|
+
const target_dir = path.join(_conf[`studio_drive_path`], target_file);
|
|
628
629
|
try {
|
|
629
|
-
fse.unlinkSync(
|
|
630
|
+
fse.unlinkSync(target_dir);
|
|
630
631
|
} catch (error) {}
|
|
631
632
|
|
|
632
|
-
fse.copyFileSync(tempPath,
|
|
633
|
+
fse.copyFileSync(tempPath, target_dir);
|
|
633
634
|
}
|
|
634
635
|
|
|
635
636
|
let doc_ret;
|
|
@@ -726,7 +727,11 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
726
727
|
return {
|
|
727
728
|
code: 760,
|
|
728
729
|
data: {
|
|
729
|
-
server_file_name: `https://${
|
|
730
|
+
server_file_name: `https://${
|
|
731
|
+
process.env.XUDA_HOSTNAME
|
|
732
|
+
}/${drive_type}-drive${
|
|
733
|
+
drive_type === "studio" ? target_dir : file_name
|
|
734
|
+
}`,
|
|
730
735
|
filename: file_obj.originalname,
|
|
731
736
|
},
|
|
732
737
|
};
|