@xuda.io/drive_module 1.1.551 → 1.1.553

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 +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1400,6 +1400,13 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1400
1400
  if (!(await fs_module.file_exists(target_dir))) {
1401
1401
  await fs_module.mkdir(target_dir, 0o775, true);
1402
1402
  } else {
1403
+ if (await fs_module.file_exists(target_file)) {
1404
+ return {
1405
+ code: -762,
1406
+ data: "file already exist",
1407
+ };
1408
+ }
1409
+
1403
1410
  if (await fs_module.file_exists(target_file)) {
1404
1411
  await fs_module.unlink(target_file);
1405
1412
  }
@@ -1433,7 +1440,7 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1433
1440
  doc.app_id_reference = ref;
1434
1441
 
1435
1442
  /// check existing file
1436
- if (!check_exist) {
1443
+ if (check_exist) {
1437
1444
  const workspace_drive_res = await db_module.find_app_couch_query(
1438
1445
  app_id,
1439
1446
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.551",
3
+ "version": "1.1.553",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {