drag and drop file in custom div in react js code example
Example 1: drag n drop file upload react
<FileDrop
onTargetClick={onTargetClick}
Example 2: drag n drop file upload react
const onFileInputChange = (event) => {
const { files } = event.target;
// do something with your files...
}
Example 3: drag n drop file upload react
const onTargetClick = () => {
fileInputRef.current.click()
}