修复一些附件文件名无后缀导致报错
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
const fileUtils = {
|
||||
getExtFileName(filename) {
|
||||
const index = filename.lastIndexOf('.');
|
||||
return index !== -1 ? filename.slice(index) : '';
|
||||
try {
|
||||
const index = filename.lastIndexOf('.');
|
||||
return index !== -1 ? filename.slice(index) : '';
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
async getBuffHash(buff) {
|
||||
|
||||
Reference in New Issue
Block a user