Skip to content

Add option to preserve user's file selection sequence in FileList #11969

@Gurpeet

Description

@Gurpeet

What problem are you trying to solve?

When users select multiple files using , the FileList returned is ordered alphabetically (or by other OS-default sorting), not by the sequence in which the user clicked the files. This makes it impossible for web applications to respect user intent when file order matters (e.g., photo albums, document assembly, media galleries).
So, the current behavior is:

  1. User selects files in order: zebra.jpg, apple.jpg, monkey.jpg
  2. FileList returns: [apple.jpg, monkey.jpg, zebra.jpg] (alphabetical or file dialog sort order)
  3. No metadata about selection sequence exists

What solutions exist today?

Workarounds (all inadequate):

  1. Single-file selection repeated multiple times (poor UX)
  2. Manual drag-drop reordering after selection (extra step)
    No reliable solution exists

How would you solve it?

Any of the following options:

  1. A new HTML attribute:
  2. A new File property: [selectionIndex] (number indicating click order)
  3. A FileList property: fileList.selectionOrder (array of indices)

Anything else?

This affects any web application where file order is meaningful, forcing developers to implement complex workarounds or degrade user experience. It would be really helpful to have the files selected order returned in the order of selection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions