title: Angular 4 Imgur image upload
body: <p>I'm trying to upload an image to the Imgur API via Angular and am new to TypeScript and not sure how to start. </p>
  
  <p>Currently I am getting the file from a file picker with the following code:</p>
  
  <pre><code>let eventObj: MSInputMethodContext = &lt;MSInputMethodContext&gt; event;
  let target: HTMLInputElement = &lt;HTMLInputElement&gt; eventObj.target;
  let files: FileList = target.files;
  let file: File = files[0];
  </code></pre>
  
  <p>Now I need to take <code>file</code> and put it into the body of a POST request to the Imgur API.</p>
  
  <p>The URL for the request is <code>https://api.imgur.com/3/image</code> has headers of a authorization client ID, then a parameter in the body named <code>image</code> which is a binary file.</p>
  
  <p>Can anyone show me how to write such a request with a callback?</p>
  
  <p><a href="https://apidocs.imgur.com/#4b8da0b3-3e73-13f0-d60b-2ff715e8394f" rel="nofollow noreferrer">https://apidocs.imgur.com/#4b8da0b3-3e73-13f0-d60b-2ff715e8394f</a></p>