Closed kevinhikaruevans closed 1 year ago
Hey !
You can achieve that by using the inputProps
property :
<MuiFileInput
placeholder="Choisir un fichier"
inputProps={{
accept: 'video/*'
}}
/>
See here : https://viclafouch.github.io/mui-file-input/docs/api-reference/#inputprops--accept
@viclafouch can you please document it in the API reference? Multiple people (including me) thought it wasn't possible before stumbling onto this issue.
Got it !
Here the documentation : https://viclafouch.github.io/mui-file-input/docs/api-reference/#inputprops--accept
Is your feature request related to a problem? Please describe. I would like to filter the types of files the user can upload, e.g.
accept=".txt,text/plain"
Describe the solution you'd like Pass the
accept
prop to the file inputhttps://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
Describe alternatives you've considered N/A
Additional context N/A