I want to create a function like this...
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult SaveImage(string file, string fileName)
{
}
Where the file is the Base64 encoded string created from the image, and the fileName is the name I want to save it as. How can I use this encoded string to write the image to the server?
Do I need to use BinaryWriter
or TextWriter
or some other one? And how do you decode the data to allow it to write to the server properly?