DPZC-5/web/index.html
Szymon Parafiński b2131b547d update index.html
2023-01-30 18:47:53 +01:00

22 lines
920 B
HTML

<html lang="en">
<head>
<script>
async function parse(){
document.getElementById("result").innerHTML = "Dodawanie pliku..."
var data = new FormData()
data.append('file', document.getElementById("docpicker").files[0])
document.getElementById("result").innerHTML = "Przetwarzanie faktury ... "
resp = await fetch('http://54.172.196.142:80/invoice', {method: "POST", body: data})
document.getElementById("result").innerHTML = "Info"
data = await resp.json()
var result = JSON.stringify(data)
document.getElementById("result").innerHTML = result
}
</script>
<title>Chmura</title>
</head>
<body>
<input type="file" id="docpicker" accept=".pdf" onchange="parse()" />
<p id="result"></p>
</body>
</html>