title: How to make a path to a Web Api method
body: <p>I want to write a method that can dynamically send a folder path and then send an image file to the client.</p>
  
  <blockquote>
    <p>The code is static</p>
  </blockquote>
  
  <pre><code>[Route("GetImageFile/{id}")]
  [HttpGet]
  public HttpResponseMessage GetImageFile(string id)
  {
      var response = new HttpResponseMessage(HttpStatusCode.OK);
      FileStream stream = new FileStream(@"d:\gate\images\" + @"\" + id + ".jpg", 
                   System.IO.FileMode.Open);
      response.Content = new StreamContent(stream);
      response.Content.Headers.ContentType = 
                   new System.Net.Http.Headers.MediaTypeHeaderValue("image/png");
      return response;
  }
  </code></pre>
  
  <p><strong>Now I want to take the episode</strong> <code>@ "d: \ gate \ images \"</code> <strong>dynamically from the client.</strong></p>