Skip to content

Commit

Permalink
Indlæs fra filer
Browse files Browse the repository at this point in the history
  • Loading branch information
jona799t committed Oct 24, 2023
1 parent fc673cb commit 301584c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/routes/auth/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,17 @@
console.log(`Error scanning file. Reason: ${err}`);
});
}
function qrCodeUploaded(e) {
e.preventDefault();
e.stopPropagation();
console.log(e);
function qrCodeUploaded(element) {
element.preventDefault();
const html5QrCode = new Html5Qrcode('reader');
html5QrCode.scanFile(element.target.files[0], false)
.then(qrCodeMessage => {
qrUrl = qrCodeMessage;
})
.catch(err => {
console.log(`Error scanning file. Reason: ${err}`);
});
}
</script>
Expand Down

0 comments on commit 301584c

Please sign in to comment.