title: Loopj - Uploading Files with RequestParams c# .net
body: <p>Trying to upload a file with params using loopj. 
  im trying to get file from Request.Files and params from Request.Form["create"]
  but it is not uploading to the server. </p>
  
  <p>Android Post method</p>
  
  <pre><code>try { 
                  String createTeamURL = "http://url"; 
                  RequestParams params = new RequestParams();
                  params.put("file", new File(pathoffile));
                  params.add("create", regString);
                  AsyncHttpClient client = new AsyncHttpClient();
                  client.post(createTeamURL, params, new AsyncHttpResponseHandler() {
  
                      @Override
                      public void onStart() {
                          // called before request is started
                      }
  
                      @Override
                      public void onSuccess(int statusCode, Header[] headers, byte[] response) {
                          // called when response HTTP status is "200 OK"
                      }
  
                      @Override
                      public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {
                          // called when response HTTP status is "4XX" (eg. 401, 403, 404)
                      }
  
                      @Override
                      public void onRetry(int retryNo) {
                          // called when request is retried
                      }
                  });
              } catch (Exception e) {
                  Log.e("createTeamPreStep", e.getMessage());
              }
  </code></pre>
  
  <p>My Web Api c# method</p>
  
  <pre><code> [HttpPost]
          public async Task&lt;string&gt; CreateUHS()
          {
              var resultString = "";
  
              foreach(HttpPostedFileBase s in Request.Files)
              {
                  var a=s; 
              }
  
              String sdf = Request.Form["create"];
  
          }
  </code></pre>