@xuda.io/drive_module 1.1.590 → 1.1.592

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 +11 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -625,7 +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
+ const master_id = await _common.get_project_app_id(req.app_id, true);
629
+ const target_dir = path.join(
630
+ _conf[`studio_drive_path`],
631
+ master_id,
632
+ target_file
633
+ );
629
634
  try {
630
635
  fse.unlinkSync(target_dir);
631
636
  } catch (error) {}
@@ -727,7 +732,11 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
727
732
  return {
728
733
  code: 760,
729
734
  data: {
730
- server_file_name: `https://${process.env.XUDA_HOSTNAME}/${drive_type}-drive${file_name}`,
735
+ server_file_name: `https://${
736
+ process.env.XUDA_HOSTNAME
737
+ }/${drive_type}-drive${
738
+ drive_type === "studio" ? target_dir : file_name
739
+ }`,
731
740
  filename: file_obj.originalname,
732
741
  },
733
742
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.590",
3
+ "version": "1.1.592",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {