I have some simple code that so far has worked on all mobile devices, as a PWA, except for the Note 10. The use snaps a pic with their mobile device that I load up to the server. It works on all devices except the Note 10. On that device, FileUpload1.HasFile is always false unless I browse to a gallery pic, not take a new photo with the camera.
//in the .aspx file
<asp:fileupload id="FileUpload1" runat="server" onclick="loadPicClick();" onchange="__doPostBack('', '');" accept=".jpg,.jpeg,">
//in the code behind
public partial class index : System.Web.UI.Page
{
static string unusedPic;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// some initialization code
}
if (FileUpload1.HasFile)
{
string ulFile = DateTimeOffset.Now.ToUnixTimeMilliseconds().ToString() + FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath("~/Pics/" + ulFile));
// some more code not related
}
}
What I have tried:
I have tried adding Page.Form.Attributes.Add("enctype", "multipart/form-data");
to the page load.