We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef56be2 commit 2b8d9a5Copy full SHA for 2b8d9a5
src/ChatWindow/Room.vue
@@ -744,12 +744,13 @@ export default {
744
const file = files[0]
745
const fileURL = URL.createObjectURL(file)
746
const blobFile = await fetch(fileURL).then(res => res.blob())
747
+ const typeIndex = file.name.lastIndexOf('.');
748
749
this.file = {
750
blob: blobFile,
- name: file.name.split('.')[0],
751
+ name: file.name.substring(0, typeIndex),
752
size: file.size,
- type: file.name.split('.')[1] || file.type,
753
+ type: file.name.substring(typeIndex) || file.type,
754
localUrl: fileURL
755
}
756
if (this.isImageCheck(this.file)) this.imageFile = fileURL
0 commit comments