Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How To Give Path To Store Downloaded Files

Karthik MatadeOct 5 2024

I have this function in html page header in oracle apex 20.1 (Downloading PL/SQL dynamic content region)
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>

<script type="text/javascript">
function downloadFile(receiptId) {
var element = document.getElementById('content');

   if (element) {  
       var opt = {  
           margin: 1,  
           filename: receiptId +'.pdf',  
           image: { type: 'jpeg', quality: 0.98},  
           html2canvas: { scale: 5 },  
           jsPDF: { unit: 'mm', format: 'A4', orientation: 'portrait' }  
       };

       html2pdf().from(element).set(opt).save().then(function() {  
           console.log('PDF downloaded successfully');  
       }).catch(function(err) {  
           console.error('Error generating PDF:', err);  
       });  
             
   } else {  
       console.error("Content element not found.");  
   }  

}
</script>

Any how here the file downloading and storing in downloaded files in the system .But I want store the downloaded files into c drive how to do ?

This post has been answered by InoL on Oct 5 2024
Jump to Answer
Comments
Post Details
Added on Oct 5 2024
3 comments
315 views