@xuda.io/drive_module 1.1.775 → 1.1.777

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
@@ -2542,7 +2542,13 @@ setTimeout(async function () {
2542
2542
  // );
2543
2543
  }, 2000);
2544
2544
 
2545
- const get_drive_doc = async function (drive_type, app_id, uid, file_path) {
2545
+ const get_drive_doc = async function (
2546
+ drive_type,
2547
+ app_id,
2548
+ uid,
2549
+ file_path,
2550
+ headers
2551
+ ) {
2546
2552
  let check_req = {
2547
2553
  app_id,
2548
2554
  uid,
@@ -2583,10 +2589,11 @@ const get_drive_doc = async function (drive_type, app_id, uid, file_path) {
2583
2589
 
2584
2590
  if (doc_ret.code < 0) {
2585
2591
  if (drive_type === "studio") {
2592
+ const file_name = path.basename(file_path);
2586
2593
  const ext = path.extname(file_name).toLowerCase();
2587
2594
  doc = {
2588
2595
  _id: file_name,
2589
- docType: `${drive_type}_drive`,
2596
+ docType: `studio_drive`,
2590
2597
  stat: 3,
2591
2598
  server_file_name: file_name,
2592
2599
  originalname: file_name,
@@ -2605,4 +2612,6 @@ const get_drive_doc = async function (drive_type, app_id, uid, file_path) {
2605
2612
  throw new Error("file doc not found");
2606
2613
  }
2607
2614
  }
2615
+
2616
+ return doc_ret.data;
2608
2617
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.775",
3
+ "version": "1.1.777",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {