Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to save image captured from iphone through web app to location in computer
    text
    copied!<p>I want to aceess iphone camera through web app and take picture annd save it to my computer. I am able to access camera but not able to save the picture from iphone to computer.</p> <pre><code>&lt;form action="upload.aspx" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" id="files" runat="server" name="files" accept="image/*" capture="camera" /&gt; &lt;/form&gt; upload.aspx using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; namespace PartsMobile { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Request.Files["files"] != null) { HttpPostedFile MyFile = Request.Files["files"]; //Setting location to upload files //string TargetLocation = Server.MapPath("~/Files"); string TargetLocation = @"c:\Projects3\Files"; try { if (MyFile.ContentLength &gt; 0) { //Determining file name string FileName = MyFile.FileName; string str = Path.GetFileName(FileName); //Determining file size int FileSize = MyFile.ContentLength; //Creating a byte array corresponding to file size. byte[] FileByteArray = new byte[FileSize]; //Posted file is being pushed into byte array. MyFile.InputStream.Read(FileByteArray, 0, FileSize); //Uploading properly formatted file to server. MyFile.SaveAs(Path.Combine(TargetLocation, str)); var invalidChars = Path.GetInvalidFileNameChars(); } } catch (Exception BlueScreen) { //Handle errors } } } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload