title: How to upload images one by one to server in react
body: <p>I want to upload 4 images  one by one  to server, in response i will get 4 urls and save all urls in a state in react</p>
  <pre><code>const multiStatement= async(e) =&gt; {
       const files = e.target.files;
       const fd = new FormData()
  
      files.map(img=&gt;{
       fd.append(`file`, img)
      const res = axios.post(url,fd)
  
      console.log( res.data.url)//save this url 
     })
  }
  &lt;input type=&quot;file&quot; id=&quot;file&quot; multiple name=&quot;file&quot; onChange={multiStatement} /&gt;
  </code></pre>