I have a WebApi service handling an upload from a simple form, like this one:
You need to look for various subclasses of HttpContent.
You create a multiform http content and add various parts to it. In your case you have a byte array content and form url encoded along the lines of:
HttpClient c = new HttpClient();
var fileContent = new ByteArrayContent(new byte[100]);
fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
{
FileName = "myFilename.txt"
};
var formData = new FormUrlEncodedContent(new[]
{
new KeyValuePair("name", "ali"),
new KeyValuePair("title", "ostad")
});
MultipartContent content = new MultipartContent();
content.Add(formData);
content.Add(fileContent);
c.PostAsync(myUrl, content);