Skip to content

Commit ccf5ec5

Browse files
Merge pull request #682 from GetStream/fix-image-upload-from-file-error
CRNS-325: Treat images from file picker as files
2 parents 32461fe + 5ca1a25 commit ccf5ec5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,14 @@ export const MessageInputProvider = <
612612
const mimeType = lookup(doc.name);
613613

614614
if (mimeType && mimeType?.startsWith('image/')) {
615-
uploadNewImage(doc);
615+
/**
616+
* TODO: The current tight coupling of images to the image
617+
* picker does not allow images picked from the file picker
618+
* to be rendered in a preview via the uploadNewImage call.
619+
* This should be updated alongside allowing image a file
620+
* uploads together.
621+
*/
622+
uploadNewFile(doc);
616623
} else {
617624
uploadNewFile(doc);
618625
}

0 commit comments

Comments
 (0)