2023-02-15 22:29:14 +01:00
|
|
|
<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 = "Proszę chwilę poczekać, zaraz wypluje info o fakturze :)"
|
2023-02-15 23:41:53 +01:00
|
|
|
resp = await fetch('http://3.237.77.192:80/invoice', {method: "POST", body: data})
|
2023-02-15 22:29:14 +01:00
|
|
|
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>
|