From cdb37a372b8cda9e73a7dd9f5a0009559b09cea6 Mon Sep 17 00:00:00 2001 From: Eleazar Resendez Date: Wed, 15 Jul 2026 11:35:57 -0600 Subject: [PATCH] FOUR-32224: Skip temporary Web Entry files in File Download --- src/components/renderer/file-download.vue | 9 +++++ tests/unit/FileDownloadUtils.spec.js | 49 +++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tests/unit/FileDownloadUtils.spec.js diff --git a/src/components/renderer/file-download.vue b/src/components/renderer/file-download.vue index 395a7d9f1..8737a9164 100644 --- a/src/components/renderer/file-download.vue +++ b/src/components/renderer/file-download.vue @@ -121,6 +121,9 @@ export default { this.setFilesInfo(); }, methods: { + isWebEntryTemporaryFileId(fileId) { + return typeof fileId === "string" && fileId.startsWith("webentry_"); + }, downloadFile(file) { if (this.collection) { this.downloadCollectionFile(file); @@ -209,6 +212,12 @@ export default { const fileId = this.value ? this.value : _.get(this.requestData, this.fileDataName, null); + + if (this.isWebEntryTemporaryFileId(fileId)) { + this.filesInfo = []; + return; + } + let { endpoint } = this; if (this.requestFiles) { diff --git a/tests/unit/FileDownloadUtils.spec.js b/tests/unit/FileDownloadUtils.spec.js new file mode 100644 index 000000000..2acf8a663 --- /dev/null +++ b/tests/unit/FileDownloadUtils.spec.js @@ -0,0 +1,49 @@ +const fs = require("fs"); +const path = require("path"); +const vm = require("vm"); + +const componentPath = path.join( + process.cwd(), + "src/components/renderer/file-download.vue" +); + +const source = fs.readFileSync(componentPath, "utf8"); + +function getComponentOptions() { + const scriptMatch = source.match(/