aws/invoice/index.html

25 lines
1.1 KiB
HTML
Raw Normal View History

2023-02-05 19:26:53 +01:00
<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
2023-02-01 01:54:18 +01:00
}
2023-02-05 19:26:53 +01:00
</script>
<title>Chmura</title>
</head>
<body>
<input type="file" id="docpicker" accept=".pdf" onchange="parse()" />
<p id="result"></p>
</body>
2023-02-01 01:54:18 +01:00
</html>