Skip to content

Commit 75dec42

Browse files
committed
Added checks for image and removed webm format
1 parent 86af4e2 commit 75dec42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/meteor/client/views/admin/customEmoji/AddCustomEmoji.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const AddCustomEmoji = ({ close, onChange, ...props }: AddCustomEmojiProps): Rea
6060
await saveAction(formData);
6161
}, [emojiFile, name, aliases, saveAction]);
6262

63-
const [clickUpload] = useSingleFileInput(setEmojiPreview, 'emoji');
63+
const [clickUpload] = useSingleFileInput(setEmojiPreview, 'image/*', 'emoji');
6464

6565
const handleChangeName = (e: ChangeEvent<HTMLInputElement>): void => {
6666
if (e.currentTarget.value !== '') {

apps/meteor/client/views/admin/customEmoji/EditCustomEmoji.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const EditCustomEmoji = ({ close, onChange, data, ...props }: EditCustomEmojiPro
135135
[setAliases, name],
136136
);
137137

138-
const [clickUpload] = useSingleFileInput(setEmojiFile, 'emoji');
138+
const [clickUpload] = useSingleFileInput(setEmojiFile, 'image/*', 'emoji');
139139

140140
const handleChangeName = (e: ChangeEvent<HTMLInputElement>): void => {
141141
if (e.currentTarget.value !== '') {

0 commit comments

Comments
 (0)