title: retrieving posted files using Golang Gin
body: <p>I'm using the Golang framework Gin for a while now with no issues but I now need to process images posted to my API. </p>
  
  <p>I can probably figure out how to deal with validating, resizing and storing the image but for now I'm just struggling to figure out how to grab the posted file and assign it to a variable. </p>
  
  <p>I've looked at the Gin API docs but nothing is jumping out at me.</p>
  
  <p>I'm curling my API as follows (this might be wrong?)...</p>
  
  <pre><code>$ time curl -X POST --form upload=@ss.png -H "Content-Type: application/json"  --cookie 'session=23423v243v25c08efb5805a09b5f288329003' "http://127.0.0.1:8080/v1.0/icon" --form data='{"json_name":"test json name","title":"Test","url":"http://sometest.com"}'
  </code></pre>