Answers for "how to upload file with button react"

1

how to upload file with button react

document.getElementById('buttonid').addEventListener('click', openDialog);

function openDialog() {
  document.getElementById('fileid').click();
}

<input id='fileid' type='file' hidden/>
<input id='buttonid' type='button' value='Upload MB' />
Posted by: Guest on March-30-2022
0

upload file react onclick

<input type="file" id="file" ref="fileUploader" style={{display: "none"}} />
Posted by: Guest on November-21-2021

Code answers related to "how to upload file with button react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language