aws/invoice/index.html
2023-02-05 19:26:53 +01:00

25 lines
1.1 KiB
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 = "Przetwarzanie faktury ... "
resp = await fetch('https://9kpwan8769.execute-api.us-east-1.amazonaws.com/textract/bucket-textract-s478874/prod.pdf', {method: "PUT", body: data})
document.getElementById("result").innerHTML = "Info"
data = await resp.json()
resp_db = await fetch('https://gp1q182wu2.execute-api.us-east-1.amazonaws.com/read', {method: "GET", body: data_db})
var result = JSON.stringify(data_db)
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>