Start a new topic
Solved

Can't use input type="file" in architect world

Hey !


I have a problem in wikitude world. I'have a page with an <input type="file" /> tag in it, but when i click on the button, no file selection window is showing.


Any idea of the reason why it's not working ?


Thanks,


PS: I'm using cordova plugin


Good morning Johan,



which platform do you get this problem on? Android, iOS or both?



- Daniel


Hi, I get this problem on Android, but didn't test on IOS. Johan

Hi Johan,



I've researched this a bit and it seems that the Android WebView, which the Wikitude world is running in, does not open the file picker autonomously. You will need to perform the actual action in native code by subclassing WebChromeClient. This will provide you with a callback in which to react to the user clicking your file input button.


iOS seems to be different in that respect. On the device I tested with it showed a dialog right away, letting the user choose between a file dialog or the camera as an input source.



- Daniel


Hi Daniel !

Thank you for your fast and precise answer !
Effectivelly (i post link here fore future people comming here : https://github.com/NativeScript/NativeScript/issues/5313 )


Have a nice Day

Login or Signup to post a comment