mirror of
https://github.com/eoao/cloud-mail.git
synced 2026-05-06 13:41:43 +08:00
修复一些附件文件名无后缀导致报错
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