Skip to content

Conversation

@abhipatel0211
Copy link
Contributor

@abhipatel0211 abhipatel0211 commented Jun 29, 2024

Proposed changes (including videos or screenshots)

Changes

  1. Multiple file sharing in one message.
  2. Multiple file sharing in one message in E2E encrypted rooms.
  3. Functionality of adding and removing files in FileUploadModal.
  4. Updated API endpoints rooms.media/:rid and rooms.mediaConfirm/:rid/:fileId to handle multiple files.

Steps to test or reproduce

  1. Go to a room.
  2. Try sharing multiple files.
  3. Confirm file selected.
  4. Use the FileUploadModal to add and remove files.

Further comments

This implementation is an initial version of the multiple file sharing feature. While it is functional, some minor bugs remain, particularly with image file sharing, which will be addressed in future updates.

CORE-847


This pull request introduces the ability to send multiple files in a single message within the Rocket.Chat application. Key changes include:

  • File Upload Enhancements: The file upload functionality has been significantly refactored to support multiple files, including updates to the UploadsAPI interface with new methods for managing uploads and handling encrypted content. The Upload type definition now includes both file and URL properties.

  • New Components and Hooks: Several new components and hooks have been added to manage file uploads, such as MessageComposerFile, MessageComposerFileArea, and MessageComposerFileLoader, which provide UI elements for file management, preview, and error handling. The useFileUploadDropTarget hook has been introduced to streamline file upload handling.

  • Thread and Message Integration: The PR adds support for thread-specific uploads and integrates file upload capabilities into various components like MessageBox, AudioMessageRecorder, and VideoMessageRecorder. The confirmFiles function is introduced to handle file confirmation and sending, with error handling and cleanup processes.

  • Localization and API Updates: The English localization file has been updated with new messages related to upload failures and file count limitations. A new API endpoint for media editing has been added to the REST typings.

Overall, this pull request enhances the file upload experience by allowing multiple files to be sent in a single message, improving the user interface, and refining the underlying upload logic.

@dougfabris dougfabris force-pushed the feat/multiple_files_in_one_msg branch from 357ada1 to 3b124d7 Compare December 29, 2025 17:19
@dougfabris dougfabris force-pushed the feat/multiple_files_in_one_msg branch from 3b124d7 to 48a1c28 Compare December 29, 2025 19:42
@rodrigok rodrigok force-pushed the feat/multiple_files_in_one_msg branch 9 times, most recently from 3468415 to 7aceba6 Compare December 30, 2025 22:39
@rodrigok rodrigok force-pushed the feat/multiple_files_in_one_msg branch from 7aceba6 to a4f4f43 Compare December 31, 2025 20:13
@dougfabris dougfabris force-pushed the feat/multiple_files_in_one_msg branch from 8819fcf to 1f2cd49 Compare January 5, 2026 19:19
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early in my tests of it, but I've already found a few bugs:

  1. The rooms.images endpoint is being called multiple times when I click on an image attachment. If I click on 3 attachments it's already enough to get the next request blocked by the rate limiter, which causes a weird error popup to show up instead of the image.
  2. If I try to upload an invalid image (for example, a text file renamed to image.png), the composer will show ALL files flagged with "Upload failed", even though the other files were uploaded properly.
  3. When viewing an image from a message, the arrows to jump to next/from image are inconsistent. Sometimes they are enabled, sometimes they aren't. I didn't find any pattern for it.

@dougfabris
Copy link
Member

@pierre-lehnen-rc About item 2 I will investigate. Items 1 and 3 are not related to the change we're doing here!

FYI on item 3, you probably forgot but we do not store the position of an image so when we open the carousel it starts the load from the clicked image

@juliajforesti juliajforesti force-pushed the feat/multiple_files_in_one_msg branch from c56e1f5 to c556588 Compare January 7, 2026 20:16
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.