Skip to content

Drag-and-drop upload fails to upload multiple files with the same size #38108

@dodaa08

Description

@dodaa08

Description:

When dragging and dropping multiple files with the same file size into a channel, only one file gets uploaded. The deduplication logic uses only file.size as the unique key, causing files with identical sizes to be treated as duplicates and silently ignored.

Steps to reproduce:

  1. Create two text files with the same size but different names and content (e.g., echo "Hello World 123" > file1.txt and echo "Different Text!" > file2.txt - both 16 bytes)
  2. Open any channel, team, or direct message
  3. Drag and drop both files simultaneously into the message input area

Expected behavior:

Both files should be uploaded and appear in the chat.

Actual behavior:

Only one file is uploaded; the second file with the same size is silently ignored.

Screencast.From.2026-01-08.23-01-46.mp4

Server Setup Information:

  • Version of Rocket.Chat Server: 8.1.0-develop
  • Operating System: Fedora Workstation 41
  • Deployment Method: Local development
  • NodeJS Version: 22.16.0

Client Setup Information

  • Desktop App or Browser Version: Chrome
  • Operating System: Fedora Workstation 41

Additional context

The deduplication logic in useFileUploadDropTarget.ts uses file.size as the unique key, which causes different files with the same size to be incorrectly filtered out as duplicates.

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