here's my AS3 code:
var jpgEncoder:JPGEncoder = new JPGEncoder(100);
var jpgStream:ByteArray = jpgEncoder.encode(bitmapData);
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
var jpgURLRequest:URLRequest = new URLRequest("/patients/webcam.aspx");
jpgURLRequest.requestHeaders.push(header);
jpgURLRequest.method = URLRequestMethod.POST;
jpgURLRequest.data = jpgStream;
navigateToURL(jpgURLRequest, "_self");
And here's my ASP.Net Code
try
{
string pt = Path.Combine(PathFolder, "test.jpg");
HttpFileCollection fileCol = Request.Files;
Response.Write(fileCol.Count.ToString());
foreach (HttpPostedFile hpf in fileCol)
{
hpf.SaveAs(pt);
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
im getting a weird error, HttpFox mentioned: "NS_ERROR_NET_RESET"
Any help would be excellent!
Thanks!