@xuda.io/drive_module 1.1.648 → 1.1.649
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 -12
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -713,12 +713,13 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
713
713
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
714
714
|
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
715
715
|
|
|
716
|
-
doc.bucket
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
716
|
+
doc.bucket[`${process.env.XUDA_HOSTNAME}`] =
|
|
717
|
+
await upload_file_to_spaces(
|
|
718
|
+
tempPath,
|
|
719
|
+
app_id_master,
|
|
720
|
+
drive_type,
|
|
721
|
+
file_name
|
|
722
|
+
);
|
|
722
723
|
|
|
723
724
|
save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|
|
724
725
|
misc_module.rsync_drive_resources_to_remote_servers(
|
|
@@ -728,12 +729,8 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
728
729
|
break;
|
|
729
730
|
}
|
|
730
731
|
case "user": {
|
|
731
|
-
doc.bucket
|
|
732
|
-
tempPath,
|
|
733
|
-
uid,
|
|
734
|
-
drive_type,
|
|
735
|
-
file_name
|
|
736
|
-
)}
|
|
732
|
+
doc.bucket[`${process.env.XUDA_HOSTNAME}`] =
|
|
733
|
+
await upload_file_to_spaces(tempPath, uid, drive_type, file_name);
|
|
737
734
|
save_ret = await db_module.save_couch_doc("xuda_drive", doc);
|
|
738
735
|
misc_module.rsync_drive_resources_to_remote_servers("user", doc.uid);
|
|
739
736
|
break;
|