public ContentResult SaveCapture(string data)
{
string fileName = DateTime.Now.ToString("dd-MM-yy hh-mm-ss");
// string fileName = "test";
//Convert Base64 Encoded string to Byte Array.
byte[] imageBytes = Convert.FromBase64String(data.Split(',')[1]);
//Save the Byte Array as Image File.
//string filePath = Server.MapPath(string.Format("~/TestPrj/Captures/{0}.jpg", fileName));
string filePath = Server.MapPath(string.Format("~/{0}.jpg", fileName));
string datats = "test";
System.IO.File.WriteAllText(filePath, datats);
// System.IO.File.WriteAllBytes(filePath, imageBytes);
return Content("true");
}
Original file
camera ok
Capture ok
upload not working
I was create captures directory but dosent creat on server
What must be do on IIS?