I have a WebApi service handling an upload from a simple form, like this one:
<form action="/api/workitems" enctype="multipart/form-data" method="post">
<input type="hidden" name="type" value="ExtractText" />
<input type="file" name="FileForUpload" />
<input type="submit" value="Run test" />
</form>
However, I can't figure out how to simulate the same post using the HttpClient API. The FormUrlEncodedContent
bit is simple enough, but how do I add the file contents with the name to the post?