File manager - Edit - /var/www/payraty/inventory_main/form-to-html.html
Back
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>PDF to HTML</title> </head> <body> <h2>Upload PDF</h2> <input type="file" id="pdfFile" accept=".pdf" /> <button id="uploadBtn">Send to Assistant</button> <h3>Response:</h3> <pre id="response"></pre> <script> document.getElementById("uploadBtn").addEventListener("click", async () => { const fileInput = document.getElementById("pdfFile"); if (!fileInput.files.length) return alert("Please select a PDF file"); const formData = new FormData(); formData.append("file", fileInput.files[0]); const resElement = document.getElementById("response"); resElement.textContent = "Processing..."; try { const response = await fetch("/upload-pdf", { method: "POST", body: formData }); const data = await response.json(); resElement.textContent = data.response; } catch (err) { console.error(err); resElement.textContent = "Error sending file."; } }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings