Checking file type from base64?
问题 I have a WCF REST Service with the following OperationContract that saves files on the disk: [OperationContract] [WebInvoke(UriTemplate = "FileSave", Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)] ResponseHandler FileSave(string fileName, string fileContent); Files are sent through javascript - using HTML File API => binary data => base-64 encoded ASCII string (=fileContent is recieved in the