@xuda.io/drive_module 1.1.517 → 1.1.519
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 +14 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -55,7 +55,16 @@ const fs = require("fs");
|
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
exports.get_drive_files = async function (req) {
|
|
58
|
-
const {
|
|
58
|
+
const {
|
|
59
|
+
from = 0,
|
|
60
|
+
to = 999999,
|
|
61
|
+
drive_type,
|
|
62
|
+
app_id,
|
|
63
|
+
uid,
|
|
64
|
+
type,
|
|
65
|
+
date,
|
|
66
|
+
gtp_token,
|
|
67
|
+
} = req;
|
|
59
68
|
try {
|
|
60
69
|
validate_drive_type(drive_type);
|
|
61
70
|
|
|
@@ -67,7 +76,7 @@ exports.get_drive_files = async function (req) {
|
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
const get_workspace_files = async function () {
|
|
70
|
-
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
79
|
+
// const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
71
80
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
72
81
|
var opt = {
|
|
73
82
|
selector: {
|
|
@@ -110,7 +119,7 @@ exports.get_drive_files = async function (req) {
|
|
|
110
119
|
size: formatBytes(doc.size),
|
|
111
120
|
extension: doc?.file_ext?.substr(1),
|
|
112
121
|
type: doc.type,
|
|
113
|
-
access_link: `https://${process.env.XUDA_HOSTNAME}/workspace-drive/${app_id}/${doc._id}`,
|
|
122
|
+
access_link: `https://${process.env.XUDA_HOSTNAME}/workspace-drive/${app_id}/${doc._id}?gtp_token=${gtp_token}`,
|
|
114
123
|
is_archive: doc.is_archive,
|
|
115
124
|
public: doc.public,
|
|
116
125
|
path: "/" + doc._id,
|
|
@@ -705,10 +714,11 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
705
714
|
}
|
|
706
715
|
case "workspace": {
|
|
707
716
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
717
|
+
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
708
718
|
|
|
709
719
|
doc.bucket = await upload_file_to_spaces(
|
|
710
720
|
tempPath,
|
|
711
|
-
|
|
721
|
+
app_id_master,
|
|
712
722
|
drive_type,
|
|
713
723
|
file_name
|
|
714
724
|
);
|