title: Change Web APi Root Directory
body: <p>I have a Web Api Application that performs a file upload to Amazon S3 when I POST a file path to it. How do I change the root directory this file path is relative to? Right now, if I send <code>myVideo.flv</code> as the file path, my app tries to find the file to upload at <code>c:\windows\system32\inetsrv\myVideo.flv</code>. I'd like it to look for the file at <code>c:\MyApp\files\myVideo.flv</code>. Is this something I change in the app config or iis?</p>
  
  <p>Here is my controller method:</p>
  
  <pre><code>[HttpPost]
  public HttpResponseMessage move([FromBody] Models.Request request)
  {
      string videopath = request.videopath;
  
      try
      {
          PutObjectRequest putVideo = new PutObjectRequest
          {
              BucketName = WebApiConfig.AWSVideoBucket,
              Key = videopath,
              FilePath = videopath,
              ContentType = "video/flv"
          };
  
          PutObjectResponse videoResponse = WebApiConfig.AWSclient.PutObject(putVideo);
  
          if (videoResponse.HttpStatusCode == HttpStatusCode.OK)
          {
              return Request.CreateResponse(HttpStatusCode.OK);
          }
      }
      catch (FileNotFoundException e)
      {
          return Request.CreateErrorResponse(HttpStatusCode.NotFound, "File not found: " + e.Message);
      }
  }
  </code></pre>