title: How to upload multipart image to web server data using Swift?
body: <p><a href="https://i.stack.imgur.com/zffWR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zffWR.png" alt="enter image description here" /></a></p>
  <p>URL= <a href="http://peerro.com/index.php/api_v1/profile/upload_media" rel="nofollow noreferrer">http://peerro.com/index.php/api_v1/profile/upload_media</a></p>
  <p>Multipart parameters-:</p>
  <pre><code>data = {&quot;mediauploaddata&quot;: {
    &quot;type&quot; : &quot;certificate&quot;,
    &quot;id&quot; : 168,
    &quot;user_id&quot; : 159
  }
  }
  
  file=image
  </code></pre>
  <p>Note: please refer first images</p>
  <p>Now custom header is</p>
  <blockquote>
  <p>&quot;session_token&quot;:&quot;18cda675b659036e72002296c90dcea9d943d2aa37e9252d7b8a0dfa9d99252447c88d5d12564e9a11c5a462f774dc4e1cfb&quot;</p>
  <p>&quot;Content-Type&quot;: &quot;multipart/form-data&quot;</p>
  </blockquote>
  <p>Note-please refer second images:</p>
  <p><a href="https://i.stack.imgur.com/VJKiS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJKiS.png" alt="enter image description here" /></a></p>