Check Uplaod File Type in TypeScript #17604
Unanswered
MohMehrnia
asked this question in
General - Components / Directives / etc
Replies: 1 comment
-
I am guessing you are using the // :filter="checkFileType"
const checkFileType = (files: readonly File[] | FileList) => {
return Array.from(files).filter((file) => file.type === 'video/mp4');
}; But, type typing of import { QUploaderProps } from 'quasar';
const checkFileType: QUploaderProps['filter'] = (files) => {
return files.filter((file) => file.type === 'video/mp4');
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i used this code check check file type:
but in typescript and tsc-vue show me error
how do convert to typescript
Beta Was this translation helpful? Give feedback.
All reactions