cordova inappbrowser and input file

后端 未结 2 1018
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 22:44

I have a iOS and Android application, and I load a external website inside my app (this external website is mine too). My problem is that this website has a file upload fea

相关标签:
2条回答
  • 2020-12-11 23:12

    @Verl's code is pretty good! However, it cannot be installed through his installation guide... So here is mine:

    cordova plugin remove cordova-plugin-inappbrowser-camera
    cordova plugin add https://github.com/jverlee/cordova-plugin-inappbrowser-camera.git
    

    By the way, if I follow his guide, I only gets: Error: Cannot read property 'variables' of undefined

    0 讨论(0)
  • 2020-12-11 23:13

    There's an issue with both Android and iOS that prevents file uploads when clicking on a file input tag like this within the inappbrowser:

    <input type="file">
    

    There's a couple of fixes for both which I've consolidated into a single location to make it easy for anyone else facing this issue. You should be able to modify your config.xml file to use it by including this:

    <plugin spec="https://github.com/jverlee/cordova-plugin-inappbrowser-camera.git" version="1.1.0" source="git" />
    

    Instead of the default inappbrowser plugin.

    More details can be found here: https://github.com/jverlee/cordova-plugin-inappbrowser-camera

    0 讨论(0)
提交回复
热议问题