22 lines
897 B
HTML
22 lines
897 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
async function parse(){
|
|
document.getElementById("result").innerHTML = "Ładowanie"
|
|
var data = new FormData()
|
|
data.append('file', document.getElementById("docpicker").files[0])
|
|
document.getElementById("result").innerHTML = "Przechwytywanie"
|
|
resp = await fetch('http://54.224.24.43:80/invoice', {method: "POST", body: data})
|
|
document.getElementById("result").innerHTML = "Przechwycono"
|
|
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> |