-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Open
abhipatel0211
wants to merge
337
commits into
RocketChat:develop
Choose a base branch
from
abhipatel0211:feat/multiple_files_in_one_msg
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 99 commits
Commits
Show all changes
337 commits
Select commit
Hold shift + click to select a range
5a9f646
merge develop
abhipatel0211 771314e
feat: Added a file upload preview inside the messageBox
abhipatel0211 755c08b
Fix issue in uploads.ts causing duplicate messages on send
abhipatel0211 f2bd552
Cleanup: Remove unnecessary code
abhipatel0211 39ff2a3
removed unused space
abhipatel0211 23eb009
fix: lint errors
abhipatel0211 e786f70
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 f4b60d5
fix: lint and TS errors
abhipatel0211 1c0ddde
fix: ensure file handling as array to resolve type errors in uploads
abhipatel0211 f5213b0
fix: lint error and TS errors
abhipatel0211 6f398b4
fix: lint and TS errors
abhipatel0211 cdc0ff5
removed unused code
abhipatel0211 a1faa22
fix: reorder imports to fix ESLint errors and removed unused changes
abhipatel0211 326a197
fix: changed the variable name with camelCase and removed unwanted ch…
abhipatel0211 c078083
fix: changed variable names to cameCase
abhipatel0211 0e4d827
fix: added toast message while uploading file
abhipatel0211 60a80f9
Added the files to upload in the sendMessage in the executeSendMessage
abhipatel0211 7ac5841
fix: Revert back as using message API
abhipatel0211 9f74219
Removed unused import
abhipatel0211 9afeee6
Remove unwanted code
abhipatel0211 97f743b
Added defineProperty for all the files selected
abhipatel0211 68f45dc
Added different function for files and encrypted files sharing
abhipatel0211 d7b92cc
changed uploadFiles.ts and FileUploadModal.tsx to handle single file …
abhipatel0211 21005c0
Merge branch 'develop' into feat/multiple_files_in_one_msg
rodrigok a0f6c83
Added the type check for the filesToUpload and also removed the refer…
abhipatel0211 de319d8
Added isUploading and removed the unnecessary changes
abhipatel0211 3ad5e63
Added a folder of FilePreview near the messageBox and also changed th…
abhipatel0211 72bc00d
feat: Enable file attachments after typing a message
abhipatel0211 fbd30c9
Merge remote-tracking branch 'upstream/develop' into dev_feat/multipl…
abhipatel0211 fe2b428
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 b3db9fc
added title to the generic and image preview
abhipatel0211 3aa8c3d
fix: issue while sharing the message after file shared
abhipatel0211 2eb9b64
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 11aac8e
passed uploadIdsToConfirm to the sendMessage in executeSendMessage
abhipatel0211 9ff1b9f
Added newe function parseMultipleFilesIntoMessageAttachments
abhipatel0211 2370b14
added ui changes and also added the transition
abhipatel0211 47b592e
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 9722194
shifted confirm files at last after save message and attached multipl…
abhipatel0211 84bfcae
fix: image thumbnail display and remove extra msgData parameter
abhipatel0211 335e886
removed console logs
abhipatel0211 a5598f7
added a function for parse and also solved eslint error of reshuffling
abhipatel0211 7ea18d7
fix: solved lint errors messageBox and uploadfiles
abhipatel0211 822e2c5
fix: lint and TS errors
abhipatel0211 d1b6922
fix: lint error and converted description to msg
abhipatel0211 b13bdd2
fix: added description for TS error
abhipatel0211 a8cff84
Merge branch 'develop' into feat/multiple_files_in_one_msg
rodrigok 0fe3aee
Changed the location of parsing file into attachments and also added …
abhipatel0211 7347447
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 65c7be7
fix: maintain file upload order to ensure consistent fileId, fileUrl …
abhipatel0211 c4fb104
Added different function for file upload
abhipatel0211 12abfc5
removed unnecessary changes
abhipatel0211 ed463c0
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 8c91c8c
added file which upload the file and return back the file IDs and fil…
abhipatel0211 7e5081b
fix: added condition so it will remove extra space
abhipatel0211 e45e376
feat: Add drag-and-drop file upload to message box
abhipatel0211 d21dd7f
fix: added encryption of message also
abhipatel0211 8508954
fix: Issue inside the thread messages
abhipatel0211 ea689a2
fix: multiple dispatch messages
abhipatel0211 ce5b7dd
Merge branch 'feat/multiple_files_in_one_msg' into dev_feat/multiple_…
abhipatel0211 7a2324a
Merge remote-tracking branch 'upstream/develop' into dev_feat/multipl…
abhipatel0211 acdf3c1
removed onFileDrop as using setFilesToUpload
abhipatel0211 ca89baf
Merge branch 'develop' into dev_feat/multiple_files_in_one_msg
abhipatel0211 1ccc5f8
Merge branch 'develop' into feat/multiple_files_in_one_msg
abhipatel0211 724856b
Merge branch 'feat/multiple_files_in_one_msg' into dev_feat/multiple_…
abhipatel0211 f1ea0da
testing test
abhipatel0211 1d92433
Merge remote-tracking branch 'upstream/develop' into dev_feat/multipl…
abhipatel0211 8ce9034
return to old test
abhipatel0211 4437083
Merge remote-tracking branch 'upstream/develop' into dev_feat/multipl…
abhipatel0211 5f22315
fix: remove selected files when in edit mode
abhipatel0211 19df253
fix: diabled file sharing while editing
abhipatel0211 9d12bf6
Merge branch 'feat/multiple_files_in_one_msg' into dev_feat/multiple_…
abhipatel0211 71135f1
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 bbdd7a5
Merge branch 'develop' into feat/multiple_files_in_one_msg
abhipatel0211 ec6a12f
fix:TS_error_resolved
abhipatel0211 beb5723
Merge remote-tracking branch 'upstream/develop' into dev_feat/multipl…
abhipatel0211 d9a7452
Merge branch 'develop' into dev_feat/multiple_files_in_one_msg
abhipatel0211 176d676
Merge branch 'dev_feat/multiple_files_in_one_msg' into feat/multiple_…
abhipatel0211 056bfed
fix: Trans error
abhipatel0211 5dbdfc6
Merge branch 'develop' into dev_feat/multiple_files_in_one_msg
abhipatel0211 d68c421
Merge branch 'develop' into test_feat/multiple_files
abhipatel0211 11e6002
Merge branch 'develop' into feat/multiple_files_in_one_msg
abhipatel0211 d7e71b9
Merge branch 'develop' into dev_feat/multiple_files_in_one_msg
abhipatel0211 65e39c5
Merge branch 'develop' into test_feat/multiple_files
abhipatel0211 9fba829
Restore deleted subscriptions.ts file
abhipatel0211 945a224
Merge branch 'test_feat/multiple_files' into dev_feat/multiple_files_…
abhipatel0211 c060422
Merge branch 'dev_feat/multiple_files_in_one_msg' into feat/multiple_…
abhipatel0211 3cc6b17
Merge branch 'develop' into feat/multiple_files_in_one_msg
abhipatel0211 a89e0d7
Merge remote-tracking branch 'upstream/develop' into feat/multiple_fi…
abhipatel0211 08416f7
fix: merge conflict
abhipatel0211 fcc474e
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 8b176c7
feat: replace file preview
dougfabris 8db4e9d
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 007a5cc
fix: remove excessive state
dougfabris 94da580
feat: `MessageComposerFile`
dougfabris c565f4e
chore: upload API tweaks
dougfabris 7bf3b59
feat: `MessageComposerFile` loading and error
dougfabris 60b2262
chore: `RoomV2` not rendering attachments in composer
dougfabris e675268
chore: remove `UploadProgressIndicator`
dougfabris 22b981c
feat: limit number of files
dougfabris 0a001b9
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 6340dbf
feat: move file error validation to uploads.send
dougfabris 27464bb
feat: new endpoint to edit file name properly
dougfabris a11bfc0
refactor: UploadsStore
dougfabris 15237a2
feat: introduce threadUploads
dougfabris 2d7453e
chore: code cleanup
dougfabris eca7363
fix: remove `handleUploadFiles` from ThreadChat`
dougfabris 6f69c6c
fix: webdav upload flow
dougfabris 56da938
Merge branch 'develop' into feat/multiple_files_in_one_msg
rodrigok dd2839a
fix: unnecessary store clear
dougfabris 7f34a38
fix: `rooms.mediaEdit` review
dougfabris b1796d4
chore: remove unnecessary file
dougfabris 872f0c6
Fix some of my reviews
rodrigok da5dcf8
Fix last changes
rodrigok 565abe1
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 4b98e47
fix: some `rooms.mediaEdit` suggestions
dougfabris 6b8ab8e
fix: remove props from sendMessage
dougfabris c21b037
fix: remove description param from `uploadFile`
dougfabris a003a4f
fix: `rooms.mediaEdit` fileName param
dougfabris 40189e2
Fix some reviews
rodrigok 7ab58a2
refactor: upload API
dougfabris 7c6d0e4
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 70ba3de
chore: handle `confirmFiles` inside `sendMessage`
dougfabris 4c0be8e
chore: remove outdated unit test
dougfabris be927dd
chore: remove outdated translation
dougfabris c206d67
backend code improvements
pierre-lehnen-rc 931b595
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris bbfe281
chore: review tweaks
dougfabris 7bea8d8
test: add unit test for `rooms.mediaEdit`
dougfabris 3fe2d3b
test: adapt current e2e tests to the new behavior
dougfabris 726e6ac
chore: max multiple uploaded files rule
dougfabris d8a38e3
fix: uploading continuously action not cleaning after upload
dougfabris df671b6
fix: keep encryption when renaming file
dougfabris fbaa990
backend renaming of encrypted files
pierre-lehnen-rc 1635254
fix: encrypted message being send
dougfabris 481f921
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 33b659d
fix: remove `rooms.mediaEdit`
dougfabris 29404ae
chore: disable update button when form is not dirty
dougfabris af68ef2
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 7f50d02
fix: review
dougfabris cbff55d
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 447c08a
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 8bac67f
chore: changeset
dougfabris 769c798
chore: add comment to the ImageGallery workaround
dougfabris afaf266
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 26e9097
Merge branch 'develop' into feat/multiple_files_in_one_msg
ggazzo 788ee6c
Merge remote-tracking branch 'origin/develop' into feat/multiple_file…
ggazzo 4210798
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris c4a76fe
Merge branch 'develop' into feat/multiple_files_in_one_msg
rodrigok 23e9407
improvements to backend code
pierre-lehnen-rc e17fde6
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 720add4
fix: test locators
dougfabris 4286095
chore: update changeset
dougfabris e2b0cd8
i18n: missing translation
dougfabris 8790dee
fix: review
dougfabris eb94859
refactor: do not disable submit button when updating file name
dougfabris 43445e5
test: e2e-encryption
dougfabris dfa3435
test: wait large image request to send message
dougfabris b3e2541
fix: typo
dougfabris a96e873
i18n: remove unused translation
dougfabris 7c8cfbb
test: `image-upload`
dougfabris 822d1c1
test: quote-attachment
dougfabris 573d5c6
test: file-upload
dougfabris 21f11bf
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 6850713
fix: ts
dougfabris 230bc41
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 2934c06
fix: sendMessage filesToConfirm check
dougfabris cc55b16
chore: revert `rocketchat.e2e.room` changes
dougfabris a4f4f43
Merge remote-tracking branch 'origin/develop' into pr/abhipatel0211/3…
rodrigok 1f2cd49
test: fix outdated updated e2e tests
dougfabris 6b6f901
fix: change upload sequence
dougfabris 00415a5
fix: handle error of specific file in upload process
juliajforesti 8aabc84
feat: add modal confirmation for failed file uploads
juliajforesti 3bc60fc
test: add tests for handling multiple file uploads with failures
juliajforesti c556588
chore: display error message in file upload component tooltip
juliajforesti 91c5825
chore: add error feedback translations
juliajforesti 5688b08
test: add tests for multiple file uploads
juliajforesti 9a24a2e
feat: add configurable max files per message limit
ricardogarim 4e9d386
disable multi-file by default
pierre-lehnen-rc 9077bfb
save `file` attribute with the first file on the list
pierre-lehnen-rc dce346c
Merge branch 'develop' into feat/multiple_files_in_one_msg
juliajforesti 615c301
test: adjust composer locators
juliajforesti e450f82
test: adjust max files per message limit
ricardogarim 2dc7cc3
fix: delete all files when removing reported messages with multiple a…
ricardogarim 97f4868
test: update file composer methods to use new locator structure
juliajforesti 84dc860
test: reset `FileUpload_MaxFilesPerMessage` before and after tests
dougfabris 2dea937
chore: improve `MessageComposerFile` a11y with `aria-busy` and updat…
juliajforesti b3bd39f
fix: return public URLs for all files in message endpoint
ricardogarim 1dd6c3e
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 654ec75
test: set maxFilesPerMessage to 2 for omni multi-file scenario
ricardogarim 5e81cf6
Merge branch 'develop' into feat/multiple_files_in_one_msg
juliajforesti 7b1567a
test: add test fot multifile upload in threads
juliajforesti 8314b0a
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris aa8a988
test: adjust input file locator
juliajforesti fefb435
chore: update snapshots
juliajforesti c41e08a
Merge branch 'develop' into feat/multiple_files_in_one_msg
juliajforesti d93c57e
test: adjust e2e and unit failing
juliajforesti 5f7f95e
disable multi-file for omnichannel rooms
pierre-lehnen-rc d218323
validate omnichannel limit on client side too
pierre-lehnen-rc bc1f332
undoing some unnecessary changes
pierre-lehnen-rc 5d1151e
serialize processing of files
pierre-lehnen-rc 026bdc0
reducing changes to shrink the PR
pierre-lehnen-rc a100de2
Merge branch 'develop' into feat/multiple_files_in_one_msg
pierre-lehnen-rc d608af4
use new endpoint to delete files
pierre-lehnen-rc ec00572
chore: bring back old limitation
dougfabris 4c7e72b
chore: replace number max files with boolean enable multi files
dougfabris c93448c
feat: send multiple files based on setting
dougfabris b42cde1
chore: undesired types in `IMessage`
dougfabris 815439c
test: remove outdated api test
dougfabris 068a511
test: remove outdated setting from e2e tests
dougfabris b7c8931
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 189652b
test: revamp and prepare file-upload failing tests for the fix
dougfabris cc3efee
fix: do not allow drop files in composer when editing message
dougfabris eb9f404
fix: keep original file and files in e2ee messages
dougfabris 52dc433
test: remove new stale test :clown:
dougfabris 0a3b5aa
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 4c8bfdd
fix: handle image loading errors in getHeightAndWidthFromDataUrl
dougfabris 495eb6a
fix: await uploadFile in handleUpload webdav file for proper async ha…
dougfabris d60e256
fix: simplify MessageComposerFileArea structure and correct backgroun…
dougfabris f267a09
fix: ensure proper rejection of file upload errors in send method
dougfabris d644674
fix: enhance file upload process with proper async handling and error…
dougfabris 98ff478
fix: simplify waitForMediaResponse function by removing unnecessary t…
dougfabris a4a415a
fix: rename fileNameInput to inputFileName and remove unused fileDesc…
dougfabris ba6e788
fix: remove unused fileDescription and related props from defaultProp…
dougfabris 9ac3505
fix: update unique file identification logic in useFileUploadDropTarg…
dougfabris 15aecf0
fix: update upload handling logic to enable sending while uploads are…
dougfabris 88ec668
fix: update EncryptedFileUploadContent type to remove unnecessary und…
dougfabris 287e23e
fix: remove unused onUploadFiles prop from ComposerMessageProps
dougfabris f338103
feat: apply useButtonPattern in MessageComposerFile
dougfabris cc47468
some fixes
KevLehman 8927156
fix: add readonly modifier to properties in EncryptedFile type
dougfabris 71dc9e7
refactor: encapsulate upload state updates in a private method
dougfabris 53efa78
fix: move hasFiles calculation after trimming text
dougfabris 4c997e5
fix: include error check in isUploading calculation
dougfabris 2519585
fix: missing flexGrow in MessageComposerFileComponent
dougfabris dbb1599
fix: update translation keys in FileUploadModal test
dougfabris 128bb15
fix: ensure file upload description is sent with encrypted messages
dougfabris 5b860e2
fix: update file name reference in E2EE file attachment test
dougfabris 8359678
fix: correct spelling of "cancelled" to "canceled" and improve error …
dougfabris fbc9888
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris 7405f75
fix e2ee attachment references
pierre-lehnen-rc fa3bfd0
Merge branch 'develop' into feat/multiple_files_in_one_msg
KevLehman 6bf27c8
fix: handle error case for file upload response and improve error mes…
dougfabris 5f1fbf7
refactor: rename waitForMediaResponse to createMediaResponsePromise a…
dougfabris 0022943
fix: streamline E2E file upload checks by combining conditions
dougfabris 66aacbd
fix: enhance file upload handling for encrypted files and improve con…
dougfabris 33defd1
fix: enhance handling of encrypted uploads in message sending process
dougfabris ba854f0
fix: update file sending and deletion checks in files management tests
dougfabris 50bdc45
fix: update file deletion and upload handling in E2EE tests for impro…
dougfabris 4a95578
Merge branch 'develop' into feat/multiple_files_in_one_msg
dougfabris cb9ebf9
fix: review
dougfabris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Validation checks key presence but not value truthiness.
Object.keys(file).includes(field)passes even when the value isnull,undefined, or''. A caller could send{ _id: null, name: '', type: undefined, size: 0 }and this validation would not reject it, yet downstream code (e.g.,Uploads.updateFileComplete(file._id, ...)) would break or produce corrupt data.Consider checking that the value is actually present and meaningful:
🛡️ Proposed fix
function validateFilesRequiredFields(files: Partial<IUpload>[]): asserts files is MinimalUploadData[] { const requiredFields = ['_id', 'name', 'type', 'size']; for (const file of files) { - const fields = Object.keys(file); - for (const field of requiredFields) { - if (!fields.includes(field)) { + if (!(field in file) || file[field as keyof IUpload] == null) { throw new Meteor.Error('error-invalid-file', 'Invalid file'); } } } }🤖 Prompt for AI Agents