-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
357ada1 to
3b124d7
Compare
3b124d7 to
48a1c28
Compare
3468415 to
7aceba6
Compare
7aceba6 to
a4f4f43
Compare
8819fcf to
1f2cd49
Compare
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.
Early in my tests of it, but I've already found a few bugs:
- The
rooms.imagesendpoint 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. - 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.
- 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.
|
@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 |
74e93b0 to
5a46efe
Compare
c56e1f5 to
c556588
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.