Advertisement
KoctrX

Untitled

Aug 31st, 2023
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.     <meta charset="UTF-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>Document</title>
  8. </head>
  9.  
  10. <body>
  11.     <input type="file" id="file" multiple accept="application/pdf,image/png">
  12.     <hr />
  13.  
  14.     <div class="list-files"></div>
  15.     <script type="text/javascript">
  16.         document.getElementById("file").addEventListener('change', async e => {
  17.             await store.fs.uploadFiles(e.target.files);
  18.             e.target.value = '';
  19.         });
  20.     </script>
  21.  
  22.     <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf-lib/1.17.1/pdf-lib.min.js"
  23.         integrity="sha512-z8IYLHO8bTgFqj+yrPyIJnzBDf7DDhWwiEsk4sY+Oe6J2M+WQequeGS7qioI5vT6rXgVRb4K1UVQC5ER7MKzKQ=="
  24.         crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  25.  
  26.     <script src="/js/wasm/WasmFs.js"></script>
  27.     <script type="text/javascript" src="/js/wasm/tiff.min.js"></script>
  28.     <script type="text/javascript" src="/js/wasm/canvastotiff.js"></script>
  29.  
  30.     <script type="text/javascript" src="/js/wasm/pdfjs/pdf.js"></script>
  31.     <script type="text/javascript">pdfjsLib.GlobalWorkerOptions.workerSrc = '/js/wasm/pdfjs/pdf.worker.js';</script>
  32.     <script type="text/javascript" src="/wasm/js/app.js"></script>
  33. </body>
  34.  
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement