viclafouch / mui-file-input

A file input designed for the React library MUI
https://viclafouch.github.io/mui-file-input/
MIT License
77 stars 17 forks source link

Missing Support for "accept" Attribute/Prop #18

Closed noor-ul-amin0 closed 1 year ago

noor-ul-amin0 commented 1 year ago

Requesting Support for "accept" Attribute/Prop in mui-file-input Hi there,

I hope this message finds you well. First of all, I wanted to express my appreciation for the mui-file-input package. It has been incredibly useful in my Next.js project for handling file uploads.

However, while working with the package, I noticed that there is currently no support for the "accept" attribute/prop, which is commonly used to specify the file formats or types that are allowed to be selected by the user.

In my application, it is crucial to restrict the file selection to specific formats (e.g., image/jpeg, application/pdf, etc.). Without the ability to set the "accept" attribute/prop, I am unable to enforce this restriction.

I would greatly appreciate it if you could consider adding support for the "accept" attribute/prop in the mui-file-input package. This enhancement would enable developers to customize the acceptable file formats and provide a more seamless and controlled file selection experience for users.

Thank you for your attention to this matter, and I look forward to hearing your thoughts on implementing this feature. If there's any additional information or assistance I can provide, please let me know.

Best regards, Noor Ul Amin noor-ul-amin0

viclafouch commented 1 year ago

Hello !

It is already possible with the textfiled inheritance.

See : https://viclafouch.github.io/mui-file-input/docs/inheritance/

Victor