[WebMethod] public void UploadPics(String imageString) { //HttpRequest Request = new HttpRequest(); //HttpPostedFile filePosted = new HttpPostedFile(); string base64String = imageString; // Convert Base64 String to byte[] byte[] imageBytes = Convert.FromBase64String(base64String); MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length); // Convert byte[] to Image ms.Write(imageBytes, 0, imageBytes.Length); System.Drawing.Image image = System.Drawing.Image.FromStream(ms, true); //string newFile = Guid.NewGuid().ToString() + fileExtensionApplication; string filePath = "C:/Users/MUWebServices/App_Code/images/pic1.jpg"; image.Save(filePath, ImageFormat.Jpeg); }
string filePath = Server.MapPath("~/images/pic1.jpg");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)