@@ -29,8 +29,20 @@ export function twoDecimal(value) {
* @param {String} fileName
*/
export function isAllowFileType(fileName) {
- let suffix = fileName.slice(fileName.lastIndexOf('.') + 1, fileName.length);
- return ['mp3', 'mp4', 'doc', 'docx', 'pdf', 'ppt', 'xls', 'jpg', 'gif', 'png', 'txt'].includes(
- suffix
- );
+ let suffix = fileName.slice(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase();
+ return [
+ 'mp3',
+ 'mp4',
+ 'doc',
+ 'docx',
+ 'pdf',
+ 'ppt',
+ 'pptx',
+ 'xls',
+ 'jpg',
+ 'gif',
+ 'png',
+ 'txt',
+ 'rtf'
+ ].includes(suffix);
}