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 let fileinput: HTMLInputElement
const onFileSelected =(e)=>{ const onFileSelected =(e)=>{
let image = e.target.files[0]; let img = e.target.files[0];
let reader = new FileReader(); let reader = new FileReader();
reader.readAsDataURL(image); reader.readAsDataURL(img);
reader.onload = e => { reader.onload = e => {
image = e.target.result as string image = e.target.result as string
}; };

View File

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