38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script src="https://cdn.jsdelivr.net/npm/dropzone@5.2.0/dist/dropzone.min.js"></script>
|
|
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.1/css/bulma.css" />
|
|
<style>.dz-error-mark { display:none} .dz-details {display:none}
|
|
form { border: 3px solid lightgray; padding: 25px; width: 100%;}
|
|
.dz-success-mark {display:none} </style>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="app" class="container">
|
|
<h1>Invoice Parsing Demo</h1>
|
|
<form action="/pdf-upload" id="my-dropzone">
|
|
<h3>Drop invoice pdfs here</h3>
|
|
<input type="file" name="file" style="display:none"/>
|
|
</form>
|
|
<h2 style="display:none">Found invoices:</h2>
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
<script>
|
|
var myDropzone = new Dropzone("#my-dropzone");
|
|
myDropzone.on("success", function(file, a) {
|
|
$("h2").show();
|
|
JSON.parse(a).map(function(x) {
|
|
|
|
$("ul").append($("<li>").text(x));
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|