title: How to test image upload API using postman?
body: <p>I have an Image Uploading API which I call from android and Its working fine.Now I want to test same API using Postman.</p>
  
  <p>Someone please guide me to test this API on Postman. What parameters I need to set in Postman to test this API.</p>
  
  <p>I have tried to test this API using following parameters in post man but till now not able to succeed. I tried to attach image in postman parameter and converted image to binary then add that binary in postman parameter but API is giving unsuccessful response.</p>
  
  <pre><code>--16cbe71399a
  Content-Disposition: form-data; name="binaryFile"; filename="ec6152a8a12b4782b1c4bcc95cc98eeb"
  Content-Type: image/jpeg
  Content-Transfer-Encoding: binary
  binaryFile:{local path of image}
  --16cbe71399a--
  </code></pre>
  
  <p>The working android code is as follows:</p>
  
  <p>API: <code>http://testing/api/editImage/</code></p>
  
  <p>Header:</p>
  
  <pre><code>("Content-Type", "multipart/form-data; boundary=" + boundary);&lt;br&gt;
  ("Authorization", "bearer "+preference.getFileAPIAuthenticationToken())&lt;br&gt;
  </code></pre>
  
  <p>Body:</p>
  
  <pre><code>writer.append("--" + boundary).append(CRLF);
  writer.append("Content-Disposition: form-data; name=\"binaryFile\"; filename=\"" + ugid + "\"").append(CRLF);
  writer.append("Content-Type: " + URLConnection.guessContentTypeFromName(binaryFile.getName())).append(CRLF);
  writer.append("Content-Transfer-Encoding: binary").append(CRLF);
  writer.append(CRLF);
  // file write in binary
  writer.append(CRLF);
  writer.append("--" + boundary+ "--").append(CRLF);
  </code></pre>