I created a web service for file upload. When I call this webservice I can't find multipart-form data request.
If I call this webservice without a file then it will working fine.
My code is:
Interface code:
[OperationContract]
[WebInvoke(RequestFormat = WebMessageFormat.Json, Method = "POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetStream")]
void GetStream(Stream fileUpload);
Message contract code:
public void GetStream(Stream fileUpload)
{
// here I find null fileUpload object
}