@xuda.io/drive_module 1.1.602 → 1.1.603
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 +10 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1570,11 +1570,11 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1570
1570
|
};
|
|
1571
1571
|
exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
1572
1572
|
const { drive_type, app_id, uid, file_name, file_path } = req;
|
|
1573
|
-
var
|
|
1573
|
+
var master_app_id;
|
|
1574
1574
|
|
|
1575
1575
|
switch (drive_type) {
|
|
1576
1576
|
case "studio": {
|
|
1577
|
-
|
|
1577
|
+
master_app_id = await _common.get_project_app_id(req.app_id, true);
|
|
1578
1578
|
const target_dir = path.join(_conf[`studio_drive_path`], ref);
|
|
1579
1579
|
// file_name = path.join(file_path.replace(target_dir, ""), originalname);
|
|
1580
1580
|
target_file = path.join(
|
|
@@ -1592,12 +1592,15 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1592
1592
|
break;
|
|
1593
1593
|
}
|
|
1594
1594
|
case "workspace": {
|
|
1595
|
-
|
|
1595
|
+
master_app_id = await _common.get_project_app_id(req.app_id, true);
|
|
1596
1596
|
|
|
1597
|
-
const workspace_drive_res = await db_module.find_app_couch_query(
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1597
|
+
const workspace_drive_res = await db_module.find_app_couch_query(
|
|
1598
|
+
master_app_id,
|
|
1599
|
+
{
|
|
1600
|
+
selector: { docType: "workspace_drive", file_name, stat: 3 },
|
|
1601
|
+
limit: 99,
|
|
1602
|
+
}
|
|
1603
|
+
);
|
|
1601
1604
|
if (workspace_drive_res.docs.length) {
|
|
1602
1605
|
return {
|
|
1603
1606
|
code: -764,
|