title: asp fileupload control stopped working with android 8
body: <p>I am using a Microsoft ASP.NET Fileupload control to launch the users camera on an Android device, allowing them to take a picture, then upload that picture to the web server. The website is a Progressive Web Application, intended for mobile device use. 
  The functionality works fine on all versions of Android older than Android 8. Apparently, Google implemented security measures intended to block hackers from hijacking cameras for spying purposes and so now the Fileupload control no longer interfaces with the OS correctly. The control does trigger the browser to ask permission, but the OS seems to be blocking the transfer of the image from the camera to the control anyway. The controls HasFile is always false, even after the user grants permission. 
  Has anyone encountered this issue? I have a hunch that the solution may simply be to put the app in the Google Play Store. The Google stamp of Trusted App might fix the problem but I don't want to invest the time and money into doing that without knowing that that would resolve the problem. 
  Has anyone programmed around this issue and possibly have a programmatic solution?</p>
  <p>// the html</p>
  <pre><code>    &lt;asp:Image ID=&quot;UploadButtonImage&quot; runat=&quot;server&quot; ImageUrl=&quot;StockImages/Btn_choose_Tree.png&quot;  style=&quot;top: 0px; left: 0px; height: 0px; width: 0px; position: absolute;&quot; BorderStyle=&quot;Groove&quot;/&gt;
      &lt;asp:FileUpload ID=&quot;FileUpload1&quot; runat=&quot;server&quot; OnClick = &quot;loadPicClick();&quot; onchange=&quot;__doPostBack('', '');&quot;  accept=&quot;.jpg,.jpeg,&quot; style=&quot; top: 0px; left: 0px; height: 0px; width:0px; position: absolute; height: 25px; width: 175px; opacity: 0;&quot; BackColor=&quot;#333333&quot; BorderStyle=&quot;Groove&quot; ToolTip=&quot;Choose your image to add to movie&quot; /&gt;
  </code></pre>
  <p>// the C# code</p>
  <pre><code>public partial class index : System.Web.UI.Page
  {
      static string unusedPic;
      protected void Page_Load(object sender, EventArgs e)
      {
          Page.Form.Attributes.Add(&quot;enctype&quot;, &quot;multipart/form-data&quot;);
  
          if (FileUpload1.HasFile)
          {
  
              string ulFile = DateTimeOffset.Now.ToUnixTimeMilliseconds().ToString() + FileUpload1.FileName;
              FileUpload1.SaveAs(Server.MapPath(&quot;~/Pics/&quot; + ulFile));
          }
  
      }
   }  
  </code></pre>