diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js
index 57ae8c47b5a..752d459bf37 100644
--- a/src/main/resources/static/js/downloader.js
+++ b/src/main/resources/static/js/downloader.js
@@ -75,9 +75,10 @@
// 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.set(`fileInput`, file);
+ formData.append(`fileInput`, file);
});
}
diff --git a/src/main/resources/templates/convert/img-to-pdf.html b/src/main/resources/templates/convert/img-to-pdf.html
index 758e832894f..9ac3110ecdf 100644
--- a/src/main/resources/templates/convert/img-to-pdf.html
+++ b/src/main/resources/templates/convert/img-to-pdf.html
@@ -51,15 +51,11 @@