How to upload the image from the stream in WCF rest service
问题 I'm trying to create the wcf service which will upload the files like pdf,doc,xls,images but pdf, txt files are uploading and opening properly but when i'm trying to upload the image file then the file is getting uploaded but the image is not visible [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "Upload/{fileName}")] string Upload(string fileName, Stream fileContents); using (FileStream fs = new FileStream("my path", FileMode.Create)) { fileContents.CopyTo(fs); fileContents