KarimMokhtar / react-drag-drop-files

Light and simple Reactjs drag and drop files library to use with very flexible options to change, so you put whatever the design you want for your drop-area. Users can drag and drop or even select the file anywhere in the window.
MIT License
248 stars 91 forks source link

Impossible to set global file type specifier #113

Open enjoijkee opened 1 year ago

enjoijkee commented 1 year ago

The library is adding a dot before the file type when declaring video/*, audio/* or image/* in the input accept attribute. This is causing a syntax error when attempting to set types={ ['video/*'] }, as it results in <input accept=".video/*" type="file">. Is there a way to prevent the library from automatically adding the dot in these cases?

KarimMokhtar commented 2 weeks ago

Sorry, this is not available now but could be a feature in the future. If you could attribute by adding it this could be great! we could have globalTypes optional array