@xuda.io/drive_module 1.1.1046 → 1.1.1048
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 +6 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -195,7 +195,8 @@ exports.get_drive_files = async function (req) {
|
|
|
195
195
|
file_doc,
|
|
196
196
|
app_id_reference,
|
|
197
197
|
uid,
|
|
198
|
-
datasource_id
|
|
198
|
+
datasource_id,
|
|
199
|
+
domain = process.env.XUDA_HOSTNAME
|
|
199
200
|
) {
|
|
200
201
|
let files = {
|
|
201
202
|
path: req.path || "/",
|
|
@@ -215,9 +216,9 @@ exports.get_drive_files = async function (req) {
|
|
|
215
216
|
size: formatBytes(doc.size),
|
|
216
217
|
extension: doc?.file_ext?.substr(1),
|
|
217
218
|
type: doc.type,
|
|
218
|
-
access_link: `https://${
|
|
219
|
-
|
|
220
|
-
}/${
|
|
219
|
+
access_link: `https://${domain}/${drive_type}-drive/${
|
|
220
|
+
datasource_id || app_id
|
|
221
|
+
}/${doc._id}`,
|
|
221
222
|
is_archive: doc.is_archive,
|
|
222
223
|
public: doc.public,
|
|
223
224
|
path: doc.file_path,
|
|
@@ -280,6 +281,7 @@ exports.get_drive_files = async function (req) {
|
|
|
280
281
|
app_id_reference,
|
|
281
282
|
null,
|
|
282
283
|
app_obj.app_datacenter_id
|
|
284
|
+
app_obj.is_deployment?app_access_url:null
|
|
283
285
|
),
|
|
284
286
|
};
|
|
285
287
|
};
|