I would like to upload image from javascript to wcf service using post , datacontract . I read in google , using datacontract it is not possible , it can be done with message contract , because when one parameter is stream , it should not have any other parameter .
However in some links it is mentioned that it can be done by passing parameter in querystring . (ex : WCF Restful service file upload with multi-platform support ) I tried that , still getting error saying saying if stream is there as parameter , it should not contain any other parameter. But it it not possible even with query string? The following is my code
[OperationContract]
[WebInvoke(Method = "POST",UriTemplate = "/UploadFile/userId={userId}", BodyStyle = WebMessageBodyStyle.WrappedRequest)]
void UploadFile(string userId,Stream uploadingDetails);