@xuda.io/drive_module 1.1.1046 → 1.1.1047

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.
Files changed (2) hide show
  1. package/index.js +5 -4
  2. 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
- process.env.XUDA_HOSTNAME
220
- }/${drive_type}-drive/${datasource_id || app_id}/${doc._id}`,
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1046",
3
+ "version": "1.1.1047",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {