@xuda.io/drive_module 1.1.1033 → 1.1.1035

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 +16 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -414,22 +414,25 @@ exports.get_drive_files = async function (req) {
414
414
  .slice(from, to + 1);
415
415
  }
416
416
  await drill(tree.children);
417
- tree.path = get_studio_path(tree.path, app_id_master, tree?.name || "");
418
- tree.file_path = path.join(tree.path, tree.name);
417
+ // tree.path = get_studio_path(tree.path, app_id_master, tree?.name || "");
418
+ // tree.file_path = path.join(tree.path, tree.name);
419
419
  } else {
420
420
  tree = {
421
421
  children: [],
422
422
  name: tree?.name,
423
423
  size: 0,
424
- path: get_studio_path(directoryPath, app_id_master, tree?.name || ""), // directoryPath,
425
- file_path: get_studio_path(
426
- directoryPath,
427
- app_id_master,
428
- tree?.name || ""
429
- ),
424
+ // path: get_studio_path(directoryPath, app_id_master, tree?.name || ""), // directoryPath,
425
+ // file_path: get_studio_path(
426
+ // directoryPath,
427
+ // app_id_master,
428
+ // tree?.name || ""
429
+ // ),
430
430
  };
431
431
  }
432
432
 
433
+ tree.path = get_studio_path(tree.path, app_id_master, tree?.name || "");
434
+ tree.file_path = path.join(tree.path, tree.name);
435
+
433
436
  return {
434
437
  code: 200,
435
438
  data: tree,
@@ -2095,6 +2098,11 @@ const get_drive_doc = async function (
2095
2098
  const app_id_reference = await _common.get_project_app_id(app_id);
2096
2099
  const file_name = path.basename(file_path);
2097
2100
  const ext = path.extname(file_name).toLowerCase();
2101
+ const internal_file_path = path.join(
2102
+ _conf.studio_drive_path,
2103
+ app_id_reference,
2104
+ file_path
2105
+ );
2098
2106
  const statsObj = fs.statSync(file_path);
2099
2107
  doc = {
2100
2108
  _id: file_path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1033",
3
+ "version": "1.1.1035",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {