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 marked this pull request as draft July 4, 2025 14:14
Copy link
Member

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

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

Also, could we have UI tests for multiple files being uploaded? Or maybe i did not see them 👀 idk

}),
);
if (xhr.readyState === xhr.DONE) {
if (xhr.status === 400) {
Copy link
Member

Choose a reason for hiding this comment

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

Just curious: what would happen if the status is not 400 or 200? Nothing?

Copy link
Member

Choose a reason for hiding this comment

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

return this.updateOne(filter, update);
}

confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult> | undefined {
Copy link
Member

Choose a reason for hiding this comment

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

I don't see how this could return undefined

Suggested change
confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult> | undefined {
confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult> {


confirmTemporaryFile(fileId: string, userId: string): Promise<Document | UpdateResult> | undefined;

confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult> | undefined;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult> | undefined;
confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult>;

@dougfabris dougfabris force-pushed the feat/multiple_files_in_one_msg branch from c045bc5 to 573d5c6 Compare July 7, 2025 22:57
@dougfabris dougfabris removed the request for review from MarcosSpessatto December 15, 2025 15:07
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 23, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dougfabris dougfabris force-pushed the feat/multiple_files_in_one_msg branch from 6e80417 to 6850713 Compare December 23, 2025 16:49
@dougfabris dougfabris added this to the 8.1.0 milestone Dec 29, 2025
@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
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.