Witam mam taką funkcje
public ActionResult Captures()
{
var stream = Request.InputStream;
string dump;
using (var reader = new StreamReader(stream))
{
dump = reader.ReadToEnd();
DateTime nm = DateTime.Now;
string date = nm.ToString("yyyymmddMMss");
var path = Server.MapPath("~/WebImages/" + date + "test.png");
System.IO.File.WriteAllBytes(path, String_To_Bytes2(dump));
ViewData["path"] = date + "test.jpg";
Session["val"] = date + "test.jpg";
}
Off();
return View("Index");
}
private byte[] String_To_Bytes2(string strInput)
{
int numBytes = (strInput.Length) / 2;
byte[] bytes = new byte[numBytes];
for (int x = 0; x < numBytes; ++x)
{
bytes[x] = Convert.ToByte(strInput.Substring(x * 2, 2), 16);
}
return bytes;
}
która ma zapisać obraz z kamery. wszystko działa tylko zapisywany obraz jest pusty. Proszę o pomoc co w niej jest nie tak i jak to naprawić