Hi.
Based on a php app
we've tried to developp our own webapp in vbscript. All is working well. The camera starts, etc..
The problem we're left with is the following: the flash API is streaming the content of the video to a webpage, this page saves the photo as a jpg.
The PHP code we're trying to emulate is as follow
$str = file_get_contents("php://input");
file_put_contents("/tmp/upload.jpg", pack("H*", $str));
After intensive googling the best we can come up with is
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim sImagePath As String = Server.MapPath("/registration/") & "test.jpg"
Dim data As Byte() = Request.BinaryRead(Request.TotalBytes)
Dim Ret As Array
Dim imgbmp As New System.Drawing.Bitmap("test.jpg")
Dim ms As MemoryStream = New MemoryStream(data)
imgbmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
Ret = ms.ToArray()
Dim fs As New FileStream(sImagePath, FileMode.Create, FileAccess.Write)
fs.Write(Ret, 0, Ret.Length)
fs.Flush()
fs.Close()
End Sub
which is not working,
does anybody have any suggestion?