@xuda.io/drive_module 1.1.1132 → 1.1.1133
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 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -188,6 +188,11 @@ exports.get_drive_files = async function (req) {
|
|
|
188
188
|
|
|
189
189
|
for await (let doc of ret.docs) {
|
|
190
190
|
if (doc.type === 'file') {
|
|
191
|
+
let ts = '';
|
|
192
|
+
if (doc.date_modified && Date.now() - doc.date_modified < 4320 * 1000) {
|
|
193
|
+
ts = '?ts=' + Date.now();
|
|
194
|
+
}
|
|
195
|
+
|
|
191
196
|
try {
|
|
192
197
|
files.sizeInBytes += doc.size;
|
|
193
198
|
files.children.push({
|
|
@@ -196,7 +201,7 @@ exports.get_drive_files = async function (req) {
|
|
|
196
201
|
size: formatBytes(doc.size),
|
|
197
202
|
extension: doc?.file_ext?.substr(1),
|
|
198
203
|
type: doc.type,
|
|
199
|
-
access_link: `https://${domain}/${drive_type}-drive/${datasource_id || app_id}/${doc._id}`,
|
|
204
|
+
access_link: `https://${domain}/${drive_type}-drive/${datasource_id || app_id}/${doc._id}${ts}`,
|
|
200
205
|
is_archive: doc.is_archive,
|
|
201
206
|
public: doc.public,
|
|
202
207
|
path: doc.file_path,
|