23 lines
953 B
HTML
23 lines
953 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 = "Proszę chwilę poczekać, zaraz wypluje info o fakturze :)"
|
||
|
resp = await fetch('http://34.207.94.103: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>
|