Skip to content

Svelte 5: 'files' is not a valid binding #9418

@eunukasiko

Description

@eunukasiko

Describe the bug

Trying to bind files on input element throws error:

'files' is not a valid binding

bind:files works in Svelte 4.

Reproduction


  <input
    type="file"
    {accept}
    {multiple}
    bind:files
    on:change />

Logs

No response

System Info

System:
    OS: macOS 13.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 866.08 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.1 - ~/n/bin/node
    npm: 9.6.7 - ~/n/bin/npm
  Browsers:
    Chrome: 119.0.6045.123
    Safari: 17.1
  npmPackages:
    svelte: ^5.0.0-next.1 => 5.0.0-next.1

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions