File upload not working on some mobile devices.

File upload not working on some mobile devices.

  
We have a mobile application that does a simple file upload, but for some reason it does not work on any IOS mobile device and even some androids, like the HTC DNA, but it works perfectly on HTC One M8 and HTC One M9 for example. I have attached an oml file so you can see what I'm talking about. This oml file doesn't acutally upload the file anywhere, but what we are looking for is the upload button to actually open up a window where the user can select a file off of their mobile device. I'm using a separate button with javascript to call the click action on the actual file upload component because we do not like the way that component looks. We have noticed that it is this javascript way of doing it that seems to be breaking it on certian devices, but not others. Any help in understanding why it would not work would be much appreciated.
Well, a quick Google reveals that file upload on mobile browsers is often broken, and since iOS doesn't even have a file system exposed to the user, I can imagine file upload not to work as you expect (I've never owned an iOS device, so I don't know the details).
Hi Kilian thanks for your reply. I'm not sure if you looked at the oml and tested it out, but the the UploadFile OutSystem component works perfectly on both IOS and Android on every device I've tested it on, as mentioned above, it is only breaking on certain devices when I try to use the UploadFile component indirectly calling its click event through a javascript call from another button or containers click event. Like this:

"document.getElementById('"+UploadFile.Id+"').click();"

If I don't hide the UploadFile component and allow end users to click the upload button on it, then it works every time. So what I'm trying to understand is why the javascript above works on some devices and not others. So the issue is with the javascript call not working rather than mobile browsers not supporting file upload. You can test this out very quickly by loading the simple oml app into your workspace and testing it. If you unhide the UploadFile component and click on its upload button you will see that it works perfectly, including on IOS devices exposing the file system allowing them to select a file for uploading.
Hi Cody,

I see, I must've read your question too quickly, my apologies. On the devices that it fails to work, do they have different browser versions compared to the ones where it fails? Did you try in different browsers, e.g. Android browser vs. Chrome vs. FireFox?
Hi Killian, I'm not sure how to switch what browser a mobile device is using when it is running inside the native OutsystemsNow application. My guess is it is using the browser that has been setup as the default on that device. But yes I'm sure they are different browsers since iPhones typically have Safari as the default and Android uses either chrome or the built in browser. But either way it needs to work on multiple different browser types because we will not be able to require our end users to use a specific browser type. I may end up writing my own UploadFile component that allows the visual appearance to look different, because the default component works perfectly on every device we have tried it on we just don't like the way it looks visually. Thanks again for your responses!
Hi Cody,

The reason I was asking is that if it works in one browser, but not the other, you may have a different problem than when it works on none of the browser on one phone, and on all on the other.