@xuda.io/drive_module 1.1.841 → 1.1.843
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 +6 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1449,12 +1449,15 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
1451
|
let selector = {
|
|
1452
|
-
|
|
1453
|
-
originalname: path.basename(file_path),
|
|
1452
|
+
type,
|
|
1454
1453
|
file_path: path.dirname(file_path),
|
|
1455
1454
|
stat: 3,
|
|
1456
1455
|
};
|
|
1457
1456
|
|
|
1457
|
+
if (type === "file") {
|
|
1458
|
+
selector.originalname = path.basename(file_path);
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1458
1461
|
switch (drive_type) {
|
|
1459
1462
|
case "studio": {
|
|
1460
1463
|
const target_dir = path.join(_conf[`studio_drive_path`], master_app_id);
|
|
@@ -1471,6 +1474,7 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1471
1474
|
break;
|
|
1472
1475
|
}
|
|
1473
1476
|
case "workspace": {
|
|
1477
|
+
selector.docType = "workspace_drive";
|
|
1474
1478
|
const workspace_drive_res = await db_module.find_app_couch_query(
|
|
1475
1479
|
master_app_id,
|
|
1476
1480
|
{
|