Check out example codes for "attach file html". It will help you in understanding the concepts better.

Code Example 1

<label for="myfile">Select a file:</label>
<input type="file" 
  id="myfile" name="myfile">

Learn ReactJs, React Native from akashmittal.com