MVC Convert Base64 String to Image, but … System.FormatException
问题 My controller is getting an uploaded image in the request object in this code: [HttpPost] public string Upload() { string fileName = Request.Form["FileName"]; string description = Request.Form["Description"]; string image = Request.Form["Image"]; return fileName; } The value of image (at least the beginning of it) looks a lot like this: data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAYABgAAD/7gAOQWRvYmUAZAAAAAAB/... I tried to convert using the following: byte[] bImage = Convert.FromBase64String