@xuda.io/drive_module 1.1.1220 → 1.1.1222
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 +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -630,13 +630,13 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
630
630
|
const { data: app_obj } = await db_module.get_app_obj(app_id);
|
|
631
631
|
if (app_obj?.app_type === 'datacenter') {
|
|
632
632
|
const host = `root@${app_obj.app_hosting_server.ip}`;
|
|
633
|
-
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${
|
|
633
|
+
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${doc.server_file_name}; `);
|
|
634
634
|
} else if (app_obj?.is_deployment) {
|
|
635
635
|
const { data: datacenter_obj } = await db_module.get_app_obj(app_obj.app_datacenter_id);
|
|
636
636
|
const host = `root@${datacenter_obj.app_hosting_server.ip}`;
|
|
637
|
-
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${
|
|
637
|
+
await _utils.run_ssh_script(`scp ${tempPath} ${host}:/var/xuda/workspace_drive/${doc.server_file_name}; `);
|
|
638
638
|
} else {
|
|
639
|
-
doc.bucket[`${process.env.XUDA_HOSTNAME}`] = await upload_file_to_spaces(tempPath, app_id_master, drive_type,
|
|
639
|
+
doc.bucket[`${process.env.XUDA_HOSTNAME}`] = await upload_file_to_spaces(tempPath, app_id_master, drive_type, doc.server_file_name);
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|