title: How to upload multiple files with restsharp?
body: <p>I want to upload files to this api <a href="https://support.crowdin.com/api/add-file/" rel="nofollow noreferrer">https://support.crowdin.com/api/add-file/</a></p>
  
  <p>How can I create a parameter named <code>files</code> and add multiple files to it using RestSharp?</p>
  
  <p>I wrote this code so far but it doesn't work, RestSharp does not seem to upload the file as intended.</p>
  
  <pre><code>        var addUrl = new Uri($"https://api.crowdin.com/api/project/{projectIdentifier}/add-file?key={projectKey}&amp;json=");
  
  
          var restClient = new RestSharp.RestClient("https://api.crowdin.com");
          var request = new RestSharp.RestRequest($"api/project/{projectIdentifier}/add-file", RestSharp.Method.POST);
          request.AlwaysMultipartFormData = true;
  
          request.AddQueryParameter("key", projectKey);
          request.AddQueryParameter("json", "");
  
          var files = new Dictionary&lt;string, byte[]&gt;
          {
              { "testfile", File.ReadAllBytes(fileName) }
          };
          request.AddParameter("files", files, RestSharp.ParameterType.RequestBody);
  
          var restResponse = restClient.Execute(request);
  </code></pre>
  
  <p>This gives me </p>
  
  <pre><code>{
    "success":false,
    "error":{
      "code":4,
      "message":"No files specified in request"
    }
  }
  </code></pre>