@xuda.io/drive_module 1.1.1133 → 1.1.1135
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 +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -177,7 +177,7 @@ exports.get_drive_files = async function (req) {
|
|
|
177
177
|
else return (bytes / 1073741824).toFixed(2) + ' GB';
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
const fetch_drive_files = async function (ret, file_doc, app_id_reference, uid, datasource_id, domain = process.env.XUDA_HOSTNAME) {
|
|
180
|
+
const fetch_drive_files = async function (ret, file_doc, app_id_reference, uid, datasource_id, domain = process.env.XUDA_HOSTNAME, app_obj) {
|
|
181
181
|
let files = {
|
|
182
182
|
path: req.path || '/',
|
|
183
183
|
name: file_doc.data.folder_name || '/',
|
|
@@ -191,6 +191,8 @@ exports.get_drive_files = async function (req) {
|
|
|
191
191
|
let ts = '';
|
|
192
192
|
if (doc.date_modified && Date.now() - doc.date_modified < 4320 * 1000) {
|
|
193
193
|
ts = '?ts=' + Date.now();
|
|
194
|
+
} else if (app_obj?.app_build_id) {
|
|
195
|
+
ts = '?ts=' + app_obj?.app_build_id;
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
try {
|
|
@@ -250,7 +252,7 @@ exports.get_drive_files = async function (req) {
|
|
|
250
252
|
|
|
251
253
|
return {
|
|
252
254
|
code: 1,
|
|
253
|
-
data: await fetch_drive_files(ret, file_doc, app_id_reference, null, app_obj.app_datacenter_id, app_obj.is_deployment ? app_obj.app_access_url : undefined),
|
|
255
|
+
data: await fetch_drive_files(ret, file_doc, app_id_reference, null, app_obj.app_datacenter_id, app_obj.is_deployment ? app_obj.app_access_url : undefined, app_obj),
|
|
254
256
|
};
|
|
255
257
|
};
|
|
256
258
|
const get_user_files = async function () {
|