title: Return image url as result of web api 2 query
body: <p>EDIT: 
  I've update with a controller to get stream resources, but some how it still doesn't work</p>
  
  <pre><code>public class ResourcesController : Controller
  {
      public string Directory = @"D:\Desktop\MusicDatabase\Image\";
  
      [HttpGet]
      [Route("Image/{type}/{id}")]
      public HttpResponseMessage Image(string type, string id)
      {
          HttpResponseMessage httpResponseMessage = new HttpResponseMessage(HttpStatusCode.OK);
          var url = Path.Combine(Directory, type, id + ".jpg");
          byte[] fileData = System.IO.File.ReadAllBytes(url);
          MemoryStream ms = new MemoryStream(fileData);
          httpResponseMessage.Content = new StreamContent(ms);
          httpResponseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpg");
          return httpResponseMessage;
      }     
  }
  </code></pre>
  
  <p>It return a string, not the resoure file</p>
  
  <p><img src="https://i.stack.imgur.com/odntW.png" alt="enter image description here"></p>
  
  <p>When I debug, "url" variable is </p>
  
  <pre><code>"D:\\Desktop\\MusicDatabase\\Image\\song\\2.jpg"
  </code></pre>
  
  <hr>
  
  <p>old:</p>
  
  <p>I have 2 project: 1 web api2 for the server, 1 WP8 app for the client.</p>
  
  <p>the server contains db where I have link to external file resources</p>
  
  <p>e.x a Song table with IMAGE column where I stored this picture in my Desktop</p>
  
  <pre><code>public partial class Song
  {    
      public int Id { get; set; }        
      public string NAME { get; set; }
  
      private string _IMAGE;
      public string IMAGE 
      { 
          get
          {
              return Helper.Helper.ConcatDirectory(_IMAGE);
          }
          set
          {
              _IMAGE = value;
          }
      }
  </code></pre>
  
  <p>In my DB, I stored "IMAGE" column only by its index (like "Song\1.jpg"), then when I have some queries to sever, I return full URL by this</p>
  
  <pre><code>public class Helper
  {
      public static string Directory = "D:\\Desktop\\MusicDatabase\\";
      public static string ConcatDirectory(string input)
      {
          return string.Concat(Directory, input);
      }
  }
  </code></pre>
  
  <p>When I tried a query in web browser , this URL will return file stored in my PC</p>
  
  <p><img src="https://i.stack.imgur.com/pnVeK.png" alt="enter image description here"></p>
  
  <p>But my WP8 app can't show this image (debug with emulator).
  While I don't want to store this resource in my project , so is there anyway to return these images here ? (Any diffirent file type later, like song, video ...)</p>