Uploading images and other files with Svelte

<script>
  let files = []
  $: file = files[0]
</script>

<input type="file" bind:files accept="image/*" multiple>

{#each files as file}
  <div>
    <img src={URL.createObjectURL(file)} alt="">
  </div>
{/each}