Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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' />
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #upload #file #button #react
ADD COMMENT
Topic
Name
5+8 =