wubocong / react-upload-file

react upload component
MIT License
28 stars 25 forks source link

How to change the input name to add more uploads? #11

Open zignani84 opened 6 years ago

zignani84 commented 6 years ago

How to change the input name to add more uploads?

I need to insert several images one underneath the other, I do not want it to be a multiple input, I want it to be single with different names to be able to insert one by one. How can I do this?

giovanni-orciuolo commented 6 years ago

I also want to know this. I found out that if you stack in the same DOM two <ReactUploadFile/> components they will both generate a <input type="file"/> component with the same name attribute ("ajax-upload-file-input"). This generates many issues because on the moment of file choosing and uploading, the script won't know how to distinguish between those 2 components. This leads to a number of problems... PLS FIX!!!

EDIT: Just noticed that this got fixed on december 22 2017 https://github.com/wubocong/react-upload-file/pull/9#issuecomment-353581015