feat: Send multiple files into a single message
Proposed changes (including videos or screenshots)
Changes
- Multiple file sharing in one message.
- Multiple file sharing in one message in E2E encrypted rooms.
- Functionality of adding and removing files in
FileUploadModal. - Updated API endpoints
rooms.media/:ridandrooms.mediaConfirm/:rid/:fileIdto handle multiple files.
Steps to test or reproduce
- Go to a room.
- Try sharing multiple files.
- Confirm file selected.
- Use the
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.
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.
🦋 Changeset detected
Latest commit: 23e940759faf8e9c7a4b2742948b8ce0cbba4f06
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 37 packages
| Name | Type |
|---|---|
| @rocket.chat/model-typings | Minor |
| @rocket.chat/core-typings | Minor |
| @rocket.chat/models | Minor |
| @rocket.chat/i18n | Minor |
| @rocket.chat/meteor | Minor |
| @rocket.chat/apps | Patch |
| @rocket.chat/account-service | Patch |
| @rocket.chat/authorization-service | Patch |
| @rocket.chat/ddp-streamer | Patch |
| @rocket.chat/omnichannel-transcript | Patch |
| @rocket.chat/presence-service | Patch |
| @rocket.chat/queue-worker | Patch |
| @rocket.chat/stream-hub-service | Patch |
| @rocket.chat/omnichannel-services | Patch |
| rocketchat-services | Patch |
| @rocket.chat/uikit-playground | Patch |
| @rocket.chat/api-client | Patch |
| @rocket.chat/core-services | Patch |
| @rocket.chat/cron | Patch |
| @rocket.chat/ddp-client | Patch |
| @rocket.chat/freeswitch | Patch |
| @rocket.chat/fuselage-ui-kit | Major |
| @rocket.chat/gazzodown | Major |
| @rocket.chat/livechat | Patch |
| @rocket.chat/rest-typings | Minor |
| @rocket.chat/ui-contexts | Major |
| @rocket.chat/license | Patch |
| @rocket.chat/pdf-worker | Patch |
| @rocket.chat/presence | Patch |
| @rocket.chat/instance-status | Patch |
| @rocket.chat/mock-providers | Patch |
| @rocket.chat/web-ui-registration | Major |
| @rocket.chat/network-broker | Patch |
| @rocket.chat/ui-avatar | Major |
| @rocket.chat/ui-client | Major |
| @rocket.chat/ui-video-conf | Major |
| @rocket.chat/ui-voip | Major |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 59.64%. Comparing base (
6d83267) to head (7f50d02). Report is 37 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #32703 +/- ##
===========================================
- Coverage 59.64% 59.64% -0.01%
===========================================
Files 2828 2828
Lines 68519 68352 -167
Branches 15185 15151 -34
===========================================
- Hits 40870 40768 -102
+ Misses 25001 24943 -58
+ Partials 2648 2641 -7
🚀 New features to boost your workflow:
- ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Looks like this PR is not ready to merge, because of the following issues:
- This PR has conflicts, please resolve them before merging
- This PR is missing the 'stat: QA assured' label
- This PR is not mergeable
- This PR is missing the required milestone or project
Please fix the issues and try again
If you have any trouble, please check the PR guidelines
@kody start-review
Code Review Completed! 🔥
The code review was successfully completed based on your current configurations.
Kody Guide: Usage and Configuration
Interacting with Kody
-
Request a Review: Ask Kody to review your PR manually by adding a comment with the
@kody start-reviewcommand at the root of your PR. -
Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.
Current Kody Configuration
Review Options
The following review options are enabled or disabled:
| Options | Enabled |
|---|---|
| Security | ✅ |
| Code Style | ✅ |
| Kody Rules | ✅ |
| Refactoring | ✅ |
| Error Handling | ✅ |
| Maintainability | ✅ |
| Potential Issues | ✅ |
| Documentation And Comments | ✅ |
| Performance And Optimization | ✅ |
@kody start-review