2
votes

I'm writing an application for Windows Phone 8.1 and I have a problem. I configured Cordova and AngularJS for windows phone but it does not work upload files using html tag.

I have something like this in index.html:

<body ng-app="sample-app" ng-csp ng-controller="appController" ng-file-drop="filesDropped($files)">
    <h1>SAMPLE</h1>
    <small>{{model}}</small>
    <button ng-click="onClick()">scan</button>
    <br><br>
    <input type="file" multiple ng-file-select="filesDropped($files)">

The problem is that the button for upload doesn't work. In addiction this html tag works on IOs and Android.

Is there a sensible solution?

Thanks!

1

1 Answers

0
votes

Windows Phone WebView does not support this feature. One option is to intercept the change event of the input, then call the cordova file picker as illustrated here: https://stackoverflow.com/a/15872242/1104494