How to save image captured from iphone through web app to location in computer

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.

<form action="upload.aspx" method="post" enctype="multipart/form-data">
<input type="file" id="files" runat="server" name="files" 
        accept="image/*" capture="camera"  />


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 =
                    if (MyFile.ContentLength > 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


I finally solved it. It was permissions issue. I added app pool a/c to folder and that solved the issue. Thanks for your help

Need Your Help

CSS padding not working properly?


I think i have a issue with the padding.

Zend Framework 2 routing and setting the defaults 'module', 'controller', 'action' of a route

routing zend-framework2

I'm using Zend 2 version 2.2.5 and the Skeleton Application. I added a simple 'Member' module and inside a 'TestController.php'.