title: Set image src from ajax post to rest api
body: <p>Is this possible?  My ajax call looks like this:</p>
  
  <pre><code>$.ajax( {
      type: "POST",
      url: "/reporter/api/image/getimage/",
      data: { "": httpNonAccessibleFilePath },
      success: function ( imageData ) {
          $( "#imagecontent" ).append( '&lt;img src="' + imageData + '" /&gt;' );
      }
  } );
  </code></pre>
  
  <p>And on my Web.API side:</p>
  
  <pre><code>[HttpPost]
  public HttpResponseMessage GetImage([FromBody]string serverPath)
  {
      HttpResponseMessage response = new HttpResponseMessage();
      if (serverPath != null)
      {
          FileInfo fileInfo = new FileInfo(serverPath);
          if (fileInfo.Exists)
          {
              response.Content = new StreamContent( fileInfo.OpenRead() );
              response.Content.Headers.ContentType = new MediaTypeHeaderValue( "image/png" );
          }
      }
  
      return response;
  }
  </code></pre>
  
  <p>All the bits are wired up okay, i.e. I can hit the service and it returns data... but I don't see any images.  What am I missing here?</p>