Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

feat: Send multiple files into a single message

Open abhipatel0211 opened this issue 1 year ago • 6 comments

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.

abhipatel0211 avatar Jun 29 '24 14:06 abhipatel0211

🦋 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

changeset-bot[bot] avatar Jun 29 '24 14:06 changeset-bot[bot]

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

Impacted file tree graph

@@             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.

codecov[bot] avatar Aug 10 '24 18:08 codecov[bot]

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

dionisio-bot[bot] avatar Aug 21 '24 12:08 dionisio-bot[bot]

@kody start-review

rodrigok avatar Feb 18 '25 16:02 rodrigok

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-review command 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

Access your configuration settings here.

kody-ai[bot] avatar Feb 18 '25 16:02 kody-ai[bot]

@kody start-review

ggazzo avatar Mar 12 '25 18:03 ggazzo