@xuda.io/drive_module 1.1.555 → 1.1.557
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.
- package/index.js +11 -15
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1477,21 +1477,17 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1477
1477
|
break;
|
|
1478
1478
|
}
|
|
1479
1479
|
case "user": {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
data: "file already exist",
|
|
1492
|
-
duplicates: workspace_drive_res.docs,
|
|
1493
|
-
};
|
|
1494
|
-
}
|
|
1480
|
+
/// check existing file
|
|
1481
|
+
const user_drive_res = await db_module.find_couch_query("drive", {
|
|
1482
|
+
selector: { docType: "user_drive", originalname, stat: 3 },
|
|
1483
|
+
limit: 99,
|
|
1484
|
+
});
|
|
1485
|
+
if (workspace_drive_res.docs.length) {
|
|
1486
|
+
return {
|
|
1487
|
+
code: -762,
|
|
1488
|
+
data: "file already exist",
|
|
1489
|
+
duplicates: workspace_drive_res.docs,
|
|
1490
|
+
};
|
|
1495
1491
|
}
|
|
1496
1492
|
|
|
1497
1493
|
ref = uid;
|