mother / react-files

A file input (dropzone) management component for React
MIT License
145 stars 35 forks source link

How to reset the file for onChange to work if same file is uploaded again #44

Closed ajithv11 closed 1 year ago

ajithv11 commented 1 year ago

HI,

Onchange function is not triggering if I tried to upload same file again, See below code as an example

   <Files
    className='files-dropzone'
    onChange={(files)=>{
          console.log(files);// This is not logging if I upload same file again
    }}
    onError={(er,file)=>{

    }}
    accepts={['image/*']}
    multiple={false}
    maxFiles={1}
    maxFileSize={10000000}
    minFileSize={0}
    clickable
    >
    Drop files here or click to upload
  </Files>

Also Multiple= false not working

Thanks in advance

asabhaney commented 1 year ago

Unable to recreate this issue. What version of react-files are you using?