JQuery webcam Plugin - save image without PHP

前端 未结 4 1675
说谎
说谎 2021-01-07 11:45

I am using JQuery webcam plugin
Here is the home page
It seem very useful, but my problem is I don\'t know how to save image using asp.net (without using php).

4条回答
  •  庸人自扰
    2021-01-07 12:02

    I wanted to vote up JP Hellemons solution (but i can’t because i don't have the rep yet) as this has helped me out quite a bit. I have been looking for a webcam solution for some time now and haven't been able to come up with an easy straight forward solution.

    Combining sharad`s post and JP hellemons i have managed to pull together something that works. I realise this is an old post but this may help someone out.

    I used the code from above, the html/aspx mark-up and the JavaScript. Then because I’m using VB i used the following on my uploadimages.aspx code behind.

      Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            Dim data As Byte() = Context.Request.BinaryRead(Context.Request.TotalBytes)
            File.WriteAllBytes(Context.Server.MapPath("ProfileImages/" & DateTime.Now.ToString("dd_MMM_yymmssffff") & ".jpg"), data)
        End Sub
    

提交回复
热议问题