22 lines
895 B
HTML
22 lines
895 B
HTML
<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..."
|
|
resp = await fetch('http://54.205.36.47:80/invoice', {method: "POST", body: data})
|
|
document.getElementById("result").innerHTML = "Fetched..."
|
|
data = await resp.json()
|
|
var result = JSON.stringify(data)
|
|
document.getElementById("result").innerHTML = result
|
|
}
|
|
</script>
|
|
<title>Makaron</title>
|
|
</head>
|
|
<body>
|
|
<input type="file" id="docpicker" accept=".pdf" onchange="parse()" />
|
|
<p id="result"></p>
|
|
</body>
|
|
</html> |