@xuda.io/drive_module 1.1.584 → 1.1.586
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 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -52,7 +52,15 @@ const fs = require("fs");
|
|
|
52
52
|
) {
|
|
53
53
|
req.drive_type = type;
|
|
54
54
|
|
|
55
|
-
if (
|
|
55
|
+
if (
|
|
56
|
+
type === "workspace" &&
|
|
57
|
+
![
|
|
58
|
+
"get_drive_files",
|
|
59
|
+
"get_drive_file_info",
|
|
60
|
+
"search_drive_files",
|
|
61
|
+
"check_drive_file",
|
|
62
|
+
].includes(method)
|
|
63
|
+
) {
|
|
56
64
|
const { data: app_obj } = await db_module.get_app_obj(req.app_id);
|
|
57
65
|
if (app_obj.app_type === "datacenter") {
|
|
58
66
|
const deploy_module = require(`${module_path}/deploy_module`);
|
|
@@ -609,7 +617,7 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
609
617
|
const { drive_type, app_id, file_path, file_name, uid } = req;
|
|
610
618
|
validate_drive_type(drive_type);
|
|
611
619
|
|
|
612
|
-
if (!file_obj?.
|
|
620
|
+
if (!file_obj?.["originalname"]) {
|
|
613
621
|
return { code: -4, data: "file data missing" };
|
|
614
622
|
}
|
|
615
623
|
|