@xuda.io/drive_module 1.1.585 → 1.1.587
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 +17 -8
- 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`);
|
|
@@ -721,13 +729,14 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
721
729
|
};
|
|
722
730
|
} else {
|
|
723
731
|
return {
|
|
724
|
-
code: 760,
|
|
725
|
-
data:
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
732
|
+
code: -760,
|
|
733
|
+
data: "file not found",
|
|
734
|
+
// data: {
|
|
735
|
+
// server_file_name: `https://${process.env.XUDA_HOSTNAME}/${
|
|
736
|
+
// req.drive_type === "studio" ? "uploads" : "drive"
|
|
737
|
+
// }${req.file_name}`,
|
|
738
|
+
// filename: file_obj.originalname,
|
|
739
|
+
// },
|
|
731
740
|
};
|
|
732
741
|
}
|
|
733
742
|
} catch (err) {
|