From 678ef85da1aff570b5da3f31a11b7f38cc057574 Mon Sep 17 00:00:00 2001 From: Reece Browne Date: Wed, 18 Dec 2024 11:09:52 +0000 Subject: [PATCH 1/2] Don't remove files from file input, just append --- src/main/resources/static/js/downloader.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js index 894c67da..f18a4bbf 100644 --- a/src/main/resources/static/js/downloader.js +++ b/src/main/resources/static/js/downloader.js @@ -75,7 +75,6 @@ // Check if any PDF files are encrypted and handle decryption if necessary const decryptedFiles = await checkAndDecryptFiles(url, files); files = decryptedFiles; - formData.delete('fileInput'); // Reset fileInput and Append // Append decrypted files to formData decryptedFiles.forEach((file, index) => { formData.append(`fileInput`, file); From bf95ca43dc5ab74919d2e98f7f1bd7940049a284 Mon Sep 17 00:00:00 2001 From: Reece Browne Date: Wed, 18 Dec 2024 11:47:23 +0000 Subject: [PATCH 2/2] Remove append entirely --- src/main/resources/static/js/downloader.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js index f18a4bbf..77a673c0 100644 --- a/src/main/resources/static/js/downloader.js +++ b/src/main/resources/static/js/downloader.js @@ -75,10 +75,6 @@ // Check if any PDF files are encrypted and handle decryption if necessary const decryptedFiles = await checkAndDecryptFiles(url, files); files = decryptedFiles; - // Append decrypted files to formData - decryptedFiles.forEach((file, index) => { - formData.append(`fileInput`, file); - }); } submitButton.textContent = 'Processing...';