-
Notifications
You must be signed in to change notification settings - Fork 12.8k
feat: Send multiple files into a single message #32703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: Send multiple files into a single message #32703
Conversation
KevLehman
left a comment
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
| 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult> | undefined; | |
| confirmTemporaryFiles(fileIds: string[], userId: string): Promise<Document | UpdateResult>; |
c045bc5 to
573d5c6
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
6e80417 to
6850713
Compare
357ada1 to
3b124d7
Compare
3b124d7 to
48a1c28
Compare

Proposed changes (including videos or screenshots)
Changes
FileUploadModal.rooms.media/:ridandrooms.mediaConfirm/:rid/:fileIdto handle multiple files.Steps to test or reproduce
FileUploadModalto 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, andMessageComposerFileLoader, which provide UI elements for file management, preview, and error handling. TheuseFileUploadDropTargethook 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, andVideoMessageRecorder. TheconfirmFilesfunction 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.