'How to add file one after another in React js - for ex First i uploaded 1 file and after that I want to upload other file and should come below that
useEffect(() => {
document.getElementById('file').addEventListener('change', onFilesChange)
},[])
const onFilesChange=(e)=>{
setPhoto(e.target.files)
}
<input id="file" type="file" multiple style={{ display: "none" }} />
How to add file one after another for ex First i uploaded 1 file and after that I want to upload other file and should come below that
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
