I am trying to filter the file dialogue window using p-fileUpload from primeng.
I saw an example to to filter images as image/* and it works but i want ti filter for excel files. I tried file/excel, file/*.xls etc, but no help. Need help.
Try below inputs with accept property in p-fileUpload in Angular
accept="image/*"[accepts all image file types]
accept="image/*.jpeg"[accepts only JPEG image file types]
accept="application/msexcel"[accepts only xls file types]
accept=".xlsm,application/msexcel"[accepts only xls & xlsm file types]
accept="application/msmsword"[accepts only word file types]
Answered By – Cjo
Answer Checked By – David Goodson (Easybugfix Volunteer)