Filepicker.io Javascript API calls cause unsafe JavaScript errors

I am currently using AngularJS and I would like to call filePicker.pickAndStore from my download controller. Any call to the filepicker.io API function will result in an "Insecure Javascript Error" error:

The request for access to the frame request has the protocol "https", the accessed frame has the protocol "http". The puncture must match.

Javascript

angular.module('app').controller('UploadCtrl', ['$scope, function ($scope) { $scope.uploadFiles = function() { filepicker.pickAndStore({mimetype:'image/*'},{},function(files){console.log(files)},function(err){console.log(err)}); } }]); 

HTML:

 <button type="button" ng-click="uploadFiles()">Upload</button> 

The error is displayed in the console as soon as I press the button and a modal file appears.

I can still select and upload files, but I don’t know why this error occurs, since I include the http filepicker source in my project.

Thanks for any help you can provide.

+4
source share
1 answer

This is a known issue with chrome / website . This happens on any cross-domain iframe that adds a flash tag to itself via JavaScript (the method used by file picker).

The latest news from the filepicker team: they are working on a workaround for this.

+3
source

All Articles