Skip to content

Conversation

@Mil4n0r
Copy link
Collaborator

@Mil4n0r Mil4n0r commented Jan 17, 2024

Checklist

  • Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
This fixes the problem where, if we select the same file multiple times, it would stack instead of detecting it already was added. The testing was also updated in order to take this previously unrecorded scenario into account.

Additional context
Differentiating between two files with the same name using the File API can be challenging because the API itself does not provide a unique identifier or file-specific information that distinguishes files solely based on their names. So I did a comparation of multiple parameters (name, size, lastModified...) in order to ensure that 2 files are equals.

Closes #1736

@Mil4n0r Mil4n0r marked this pull request as ready for review January 17, 2024 16:06
@Mil4n0r Mil4n0r requested a review from GomezIvann January 17, 2024 16:07
@GomezIvann GomezIvann self-assigned this Jan 18, 2024
@Mil4n0r Mil4n0r requested a review from GomezIvann January 19, 2024 07:48
@Mil4n0r Mil4n0r requested a review from GomezIvann January 19, 2024 10:23
@GomezIvann GomezIvann merged commit 11fed82 into master Jan 19, 2024
@GomezIvann GomezIvann deleted the Mil4n0r/duplicate-file_inputs-fix branch January 19, 2024 10:41
@raquelarrojo raquelarrojo linked an issue Jan 22, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selecting same files in FileInput shows duplicates File input can choose same file repeatedly

3 participants