-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat: Multiple file sharing in one message #32703
base: develop
Are you sure you want to change the base?
feat: Multiple file sharing in one message #32703
Conversation
…e files by calling parseFileIntoMessageAttachments multiple times
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
@@ -30,7 +30,7 @@ const wipeFailedOnes = (): void => { | |||
}; | |||
|
|||
const send = async ( | |||
file: File, | |||
file: File[] | File, |
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.
Yes, you should extract the upload logic to another function
@@ -212,14 +213,71 @@ export function prepareMessageObject( | |||
} | |||
} | |||
|
|||
const parseFilesIntoMessageAttachments = async ( |
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.
Great, this is right, I'd only move this function to the same place of parseFileIntoMessageAttachments
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.
Thank you sir for your feedback!
Currently I've renamed the function to parseMultipleFilesIntoAttachments
and moved its location to sendFileMessage
. or else we could update parseFileIntoMessageAttachments
to handle multiple files also. Which approach do you think is better?
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.
parseMultipleFilesIntoAttachments
sounds good
…assignment, resolving encryption/decryption issues due to sequence discrepancies.
Proposed changes (including videos or screenshots)
Changes
FileUploadModal
.rooms.media/:rid
androoms.mediaConfirm/:rid/:fileId
to handle multiple files.Steps to test or reproduce
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.