@xuda.io/drive_module 1.1.615 → 1.1.616

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 +23 -19
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1419,12 +1419,16 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1419
1419
  doc = { ...doc, ...(await get_file_info(tempPath)) };
1420
1420
 
1421
1421
  const check_res = await module.exports.check_drive_file({
1422
+ app_id,
1423
+ uid,
1424
+ drive_type,
1422
1425
  file_name: doc.originalname,
1423
1426
  file_path: doc.file_path,
1424
1427
  });
1425
- if (check_res.code < 0) {
1426
- return check_res;
1427
- }
1428
+
1429
+ // if (check_res.code < 0) {
1430
+ // return check_res;
1431
+ // }
1428
1432
 
1429
1433
  switch (drive_type) {
1430
1434
  case "studio": {
@@ -1477,22 +1481,22 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1477
1481
  doc.app_id_reference = ref;
1478
1482
 
1479
1483
  /// check existing file
1480
- if (check_exist) {
1481
- const workspace_drive_res = await db_module.find_app_couch_query(
1482
- app_id,
1483
- {
1484
- selector: { docType: "workspace_drive", originalname, stat: 3 },
1485
- limit: 99,
1486
- }
1487
- );
1488
- if (workspace_drive_res.docs.length) {
1489
- return {
1490
- code: -762,
1491
- data: "file already exist",
1492
- duplicates: workspace_drive_res.docs,
1493
- };
1494
- }
1495
- }
1484
+ // if (check_exist) {
1485
+ // const workspace_drive_res = await db_module.find_app_couch_query(
1486
+ // app_id,
1487
+ // {
1488
+ // selector: { docType: "workspace_drive", originalname, stat: 3 },
1489
+ // limit: 99,
1490
+ // }
1491
+ // );
1492
+ // if (workspace_drive_res.docs.length) {
1493
+ // return {
1494
+ // code: -762,
1495
+ // data: "file already exist",
1496
+ // duplicates: workspace_drive_res.docs,
1497
+ // };
1498
+ // }
1499
+ // }
1496
1500
 
1497
1501
  doc.bucket = {
1498
1502
  [`${process.env.XUDA_HOSTNAME}`]: await upload_file_to_spaces(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.615",
3
+ "version": "1.1.616",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {