2023-01-27 21:36:03 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
async function parse(){
|
|
|
|
document.getElementById("result").innerHTML = "Submitting..."
|
|
|
|
var data = new FormData()
|
|
|
|
data.append('file', document.getElementById("docpicker").files[0])
|
|
|
|
document.getElementById("result").innerHTML = "Fetching..."
|
2023-01-29 23:41:42 +01:00
|
|
|
resp = await fetch('http://35.174.213.220:80/invoice', {method: "POST", body: data})
|
2023-01-27 21:36:03 +01:00
|
|
|
document.getElementById("result").innerHTML = "Fetched..."
|
|
|
|
data = await resp.json()
|
|
|
|
var result = JSON.stringify(data)
|
|
|
|
document.getElementById("result").innerHTML = result
|
|
|
|
}
|
|
|
|
</script>
|
2023-01-29 23:41:42 +01:00
|
|
|
<title>Chmurki chmurki</title>
|
2023-01-27 21:36:03 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<input type="file" id="docpicker" accept=".pdf" onchange="parse()" />
|
|
|
|
<p id="result"></p>
|
2023-01-29 23:41:42 +01:00
|
|
|
<img src="chmurki.jpg" alt="Me na chmurkach">
|
|
|
|
<img src="traingle.jpg" alt="If you were a triangle, you'd be acute one">
|
2023-01-27 21:36:03 +01:00
|
|
|
</body>
|
|
|
|
</html>
|