{roomTimeline.isEncrypted() &&
}
@@ -348,24 +364,6 @@ function RoomViewInput({
);
}
- function attachFile() {
- const fileType = attachment.type.slice(0, attachment.type.indexOf('/'));
- return (
-
-
- {fileType === 'image' &&
}
- {fileType === 'video' &&
}
- {fileType === 'audio' &&
}
- {fileType !== 'image' && fileType !== 'video' && fileType !== 'audio' &&
}
-
-
- {attachment.name}
- {`size: ${bytesToSize(attachment.size)}`}
-
-
- );
- }
-
function attachReply() {
return (
@@ -391,7 +389,16 @@ function RoomViewInput({
return (
<>
{ replyTo !== null && attachReply()}
- { attachment !== null && attachFile() }
+ { attachmentOrUi !== null && (
+
{
+ setAttachmentOrUi(blob);
+ roomsInput.setAttachment(roomId, blob);
+ }}
+ />
+ ) }