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
245 stars 86 forks source link

Error message with file name in it #130

Open rsilvaj opened 1 year ago

rsilvaj commented 1 year ago

Hello all,

in validateFile function there is:

if (onTypeError) onTypeError('File type is not supported');

the lib has the information about which file has the error, is it possible to add fileName information on error? such as:

if (onTypeError) onTypeError(${file.name} type is not supported);

BR