@xuda.io/drive_module 1.1.1131 → 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.
Files changed (2) hide show
  1. package/index.js +7 -2
  2. 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,
@@ -607,7 +612,7 @@ exports.update_drive_file = async function (req, job_id, headers, file_obj) {
607
612
 
608
613
  let file_url = get_file_url(drive_type, file_name, ref);
609
614
 
610
- misc_module.purge_cloudflare_cache(false, server_file_name);
615
+ // misc_module.purge_cloudflare_cache(false, server_file_name);
611
616
  return {
612
617
  code: 760,
613
618
  data: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1131",
3
+ "version": "1.1.1133",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {