mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-11-01 01:21:18 +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
 | 
			
		||||
          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);
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -51,15 +51,11 @@
 | 
			
		||||
                <br>
 | 
			
		||||
                <button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{imageToPDF.submit}"></button>
 | 
			
		||||
                <script>
 | 
			
		||||
                  $('#fileInput-input').on('change', function() {
 | 
			
		||||
                    $('#fileInput-input').on('file-input-change', () => {
 | 
			
		||||
                    var files = document.getElementById("fileInput-input").files;
 | 
			
		||||
                    var conversionType = document.getElementById("conversionType");
 | 
			
		||||
                    console.log("files.length=" + files.length)
 | 
			
		||||
                    if (files.length > 1) {
 | 
			
		||||
                      conversionType.disabled = false;
 | 
			
		||||
                    } else {
 | 
			
		||||
                      conversionType.disabled = true;
 | 
			
		||||
                    }
 | 
			
		||||
                    conversionType.disabled = files.length <= 1;
 | 
			
		||||
                  });
 | 
			
		||||
 | 
			
		||||
                  $('#conversionType').change(function() {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user