Skip to content

Commit 003ace6

Browse files
committed
(fix) image file uppercase extension
1 parent 65668a1 commit 003ace6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ChatWindow/Message.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export default {
412412
if (!file) return
413413
const imageTypes = ['png', 'jpg', 'jpeg', 'svg']
414414
const { type } = file
415-
return imageTypes.some(t => type.includes(t))
415+
return imageTypes.some(t => type.toLowerCase().includes(t))
416416
},
417417
checkImgLoad() {
418418
if (!this.checkImageFile()) return

src/ChatWindow/Room.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ export default {
587587
if (!file) return
588588
const imageTypes = ['png', 'jpg', 'jpeg', 'svg']
589589
const { type } = file
590-
return imageTypes.some(t => type.includes(t))
590+
return imageTypes.some(t => type.toLowerCase().includes(t))
591591
},
592592
openFile({ message, action }) {
593593
this.$emit('openFile', { message, action })

0 commit comments

Comments
 (0)