@xuda.io/drive_module 1.1.1191 → 1.1.1193
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 +9 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -42,13 +42,14 @@ const url = require('url');
|
|
|
42
42
|
module.exports[method + '_' + type] = async function (req, job_id, headers, file_obj) {
|
|
43
43
|
req.drive_type = type;
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
45
|
+
//// TBD
|
|
46
|
+
// if (type === 'workspace' && !['get_drive_files', 'get_drive_file_info', 'check_drive_file'].includes(method)) {
|
|
47
|
+
// const { data: app_obj } = await db_module.get_app_obj(req.app_id);
|
|
48
|
+
// if (app_obj.app_type === 'datacenter') {
|
|
49
|
+
// const deploy_module = require(`${module_path}/deploy_module`);
|
|
50
|
+
// deploy_module.reset_deployment_cache(app_obj._id);
|
|
51
|
+
// }
|
|
52
|
+
// }
|
|
52
53
|
|
|
53
54
|
return await module.exports[method](req, job_id, headers, file_obj);
|
|
54
55
|
};
|
|
@@ -1179,7 +1180,7 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1179
1180
|
if (app_obj?.app_type === 'datacenter') {
|
|
1180
1181
|
//app_obj.is_deployment // not possible, every deployment will have is own upload mechanism
|
|
1181
1182
|
const host = `root@${app_obj.app_hosting_server.ip}`;
|
|
1182
|
-
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive
|
|
1183
|
+
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${file_name}; `);
|
|
1183
1184
|
} else {
|
|
1184
1185
|
doc.bucket = {
|
|
1185
1186
|
[`${process.env.XUDA_HOSTNAME}`]: await upload_file_to_spaces(tempPath, ref, drive_type, file_name),
|