[x] Build process is done without errors. All tests pass in the /lib directory.
[x] Self-reviewed the code before submitting.
[x] Meets accessibility standards.
[x] Added/updated documentation to /website as needed.
[x] 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.
Checklist
/lib
directory./website
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