@xuda.io/drive_module 1.1.567 → 1.1.569

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 +6 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1535,17 +1535,14 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1535
1535
  }
1536
1536
  };
1537
1537
  exports.check_drive_file = async function (req, job_id, headers, file_obj) {
1538
- const { drive_type, app_id, uid, make_public, check_exist } = req;
1538
+ const { drive_type, app_id, uid, originalname } = req;
1539
1539
  var file_name, ref;
1540
1540
 
1541
1541
  switch (drive_type) {
1542
1542
  case "studio": {
1543
1543
  ref = await _common.get_project_app_id(req.app_id, true);
1544
1544
  const target_dir = path.join(_conf[`studio_drive_path`], ref);
1545
- file_name = path.join(
1546
- req.path.replace(target_dir, ""),
1547
- file_obj.originalname
1548
- );
1545
+ file_name = path.join(req.path.replace(target_dir, ""), originalname);
1549
1546
  target_file = path.join(
1550
1547
  req.path !== "/" ? req.path : target_dir,
1551
1548
  originalname
@@ -1597,6 +1594,10 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
1597
1594
  }
1598
1595
 
1599
1596
  default:
1597
+ return {
1598
+ code: -764,
1599
+ data: "invalid method",
1600
+ };
1600
1601
  break;
1601
1602
  }
1602
1603
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.567",
3
+ "version": "1.1.569",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {