bug: Sending two files (image / file) is not possible for ios and android
Closed this issue · 0 comments
MrMole96 commented
Describe the bug
Attaching files and images in one selection and then sending is not possible. Only image is sent
To Reproduce
Input
const {
handleSubmit,
numberOfUploads,
uploadNewFiles,
maxFilesLeft,
isUploadEnabled,
text,
} = useMessageInputContext();
const handleChange = (event: any) => {
const files = event.target.files;
uploadNewFiles(files);
};
...
<input
title="Attach files"
type="file"
id="file"
ref={inputFile}
multiple
onClick={() => {
if (inputFile && inputFile.current)
inputFile.current.value = "";
}}
onChange={handleChange}
style={{ display: "none" }}
/>
...
<div
onClick={(e) => {
handleSubmit(e);
inputFocusedRef.current = false;
}}
}}
>
<Send className="cursor-pointer" />
</div>
FYI: I used this trick because we couldn't add two times same file. Like you attack file, then click X then add same file again and we didn't see this file
onClick={() => {
if (inputFile && inputFile.current)
inputFile.current.value = "";
}}
example_1.mov
example_2.mov
Expected behavior
Should be able to send multiple type files in one go
Screenshots
If applicable, add screenshots to help explain your problem.
Package version
- stream-chat-react: 11.23.0