ok now bind is working

This commit is contained in:
2026-01-31 10:12:54 +13:00
parent d0eca28e55
commit 9bb1631645
2 changed files with 3 additions and 3 deletions

View File

@@ -4,9 +4,9 @@
let fileinput: HTMLInputElement
const onFileSelected =(e)=>{
let image = e.target.files[0];
let img = e.target.files[0];
let reader = new FileReader();
reader.readAsDataURL(image);
reader.readAsDataURL(img);
reader.onload = e => {
image = e.target.result as string
};

View File

@@ -4,4 +4,4 @@
let image = $state('')
</script>
<ImageTarget bind:image />
<ImageTarget bind:image />