mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-02-02 00:16:34 +01:00
Merge pull request #2476 from omar-ahmed42/fix-img-to-pdf-2456
Fix img to pdf merge conversion type
This commit is contained in:
commit
b3dfdba9cb
@ -75,9 +75,10 @@
|
|||||||
// Check if any PDF files are encrypted and handle decryption if necessary
|
// Check if any PDF files are encrypted and handle decryption if necessary
|
||||||
const decryptedFiles = await checkAndDecryptFiles(url, files);
|
const decryptedFiles = await checkAndDecryptFiles(url, files);
|
||||||
files = decryptedFiles;
|
files = decryptedFiles;
|
||||||
|
formData.delete('fileInput'); // Reset fileInput and Append
|
||||||
// Append decrypted files to formData
|
// Append decrypted files to formData
|
||||||
decryptedFiles.forEach((file, index) => {
|
decryptedFiles.forEach((file, index) => {
|
||||||
formData.set(`fileInput`, file);
|
formData.append(`fileInput`, file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,15 +51,11 @@
|
|||||||
<br>
|
<br>
|
||||||
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{imageToPDF.submit}"></button>
|
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{imageToPDF.submit}"></button>
|
||||||
<script>
|
<script>
|
||||||
$('#fileInput-input').on('change', function() {
|
$('#fileInput-input').on('file-input-change', () => {
|
||||||
var files = document.getElementById("fileInput-input").files;
|
var files = document.getElementById("fileInput-input").files;
|
||||||
var conversionType = document.getElementById("conversionType");
|
var conversionType = document.getElementById("conversionType");
|
||||||
console.log("files.length=" + files.length)
|
console.log("files.length=" + files.length)
|
||||||
if (files.length > 1) {
|
conversionType.disabled = files.length <= 1;
|
||||||
conversionType.disabled = false;
|
|
||||||
} else {
|
|
||||||
conversionType.disabled = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#conversionType').change(function() {
|
$('#conversionType').change(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user