title: How to Upload an image using BackgroundTransferService and get the server response?
body: <p>How to Upload image using wp7 BackgroundTransferService and get the server response ?</p>
  
  <pre><code> var transferRequest = new BackgroundTransferRequest(new Uri(Global.profileUploadServerUrl, UriKind.Absolute));
              transferRequest.Method = "POST";
              transferRequest.UploadLocation = new Uri(@"/shared\transfers/file.jpg", UriKind.Relative);
              transferRequest.TransferPreferences = TransferPreferences.AllowCellularAndBattery;
              transferRequest.Headers["Content-Type"] = "multipart/form-data";
              transferRequest.TransferStatusChanged += new EventHandler&lt;BackgroundTransferEventArgs&gt;(transferRequest_TransferStatusChanged);
              transferRequest.TransferProgressChanged += new EventHandler&lt;BackgroundTransferEventArgs&gt;(transferRequest_TransferProgressChanged);
  
              BackgroundTransferService.Add(transferRequest);
  
  
  
  static void transferRequest_TransferProgressChanged(object sender, BackgroundTransferEventArgs e)
      {
         // throw new NotImplementedException();
      }
  
  static void transferRequest_TransferStatusChanged(object sender, BackgroundTransferEventArgs e)
  {
      BackgroundTransferRequest request = sender as BackgroundTransferRequest;
      if (request.TransferStatus == TransferStatus.Completed)
      {
          BackgroundTransferService.Remove(request);
          if (request.StatusCode == 201)
          {
              MessageBox.Show("Upload completed.");
          }
          else
          {
              MessageBox.Show("An error occured during uploading. Please try again later." + request.StatusCode.ToString() + "/ " + request.TransferError);
          }
      }
  }
  </code></pre>
  
  <p>image loading seems to pass, but the server returns status 206.
  And how to get a response from the server?
  Here looked example, but I did not understand it.
  <a href="http://olivierlefebvre.tumblr.com/post/9330062497/upload-using-backgroundservice-and-get-the-server" rel="nofollow">In this example</a>, there is a line:</p>
  
  <pre><code>  request.DownloadLocation = new Uri (responsePath, UriKind.RelativeOrAbsolute);
  </code></pre>
  
  <p>That it is necessary to specify? if I do, it will specify the same url, it fails.
  In general, the idea after unloading image server should return a response with a link to the image. But he will come out the answer 206.
  How to get an answer?</p>