Skip to content

FileUpload duplicate key #3576

Closed
Closed
@cezaryszymanski

Description

@cezaryszymanski

Current Behavior

When selecting a file and then selecting second one with the same name the error is thrown

Uncaught Svelte error: each_key_duplicate
Keyed each block has duplicate key `some-file.txt` at indexes 0 and 1

Seems like only the file name is used as a key here

Expected Behavior

It should be possible to have multiple files with same name

Steps To Reproduce

  1. Have FileUpload that accepts multiple files
  2. Select one file and close file select dialog
  3. Open it again and select the same
  4. The error is thrown and component is no longer responsive in any way

Link to Reproduction / Stackblitz

No response

Environment Information

System:
OS: Linux 6.8 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
Memory: 15.79 GB / 31.04 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
pnpm: 10.2.0 - ~/.nvm/versions/node/v20.14.0/bin/pnpm
bun: 1.1.3 - ~/.bun/bin/bun
Browsers:
Chrome: 136.0.7103.92
npmPackages:
@skeletonlabs/skeleton: ^3.1.1 => 3.1.3
@skeletonlabs/skeleton-svelte: ^1.0.0 => 1.2.3

More Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions