I\'m writing a web api that have a post method accepting files from uploaded from UI.
public async Task> PostAsync()
{
First: Postman have a bug in handling file-based requests.
You can try adding this to your WebApiConfig.cs
it worked for me:
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
You are looking on the response header which is json format and this is ok for you.
Your real problem is with the postman request, so just remove the 'Content-Type: multipart/form-data' entry from request header. It's enough to upload a file as form-data and send the request.
Look what happen when you set the Content-Type manually vs. when you not:
Postman knows to set both the content type and boundary, since you set only the content type