filepicker.io的Javascript API调用导致不安全的JavaScript错误 [英] filepicker.io Javascript API calls result in unsafe javascript errors

查看:204
本文介绍了filepicker.io的Javascript API调用导致不安全的JavaScript错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用AngularJS,我想从我上传的控制器调用filePicker.pickAndStore。在不安全的JavaScript的尝试的错误到filepicker.io API函数结果的任何调用:

I'm currently using AngularJS, and I would like to call filePicker.pickAndStore from my Upload controller. Any call to a filepicker.io API function results in an "Unsafe Javascript attempt" error:

请求访问该框架拥有的https协议,被访问的帧的'HTTP'一>的协议。 Procols必须匹配。

The frame requesting access has a protocol of 'https', the frame being accessed has a > protocol of 'http'. Procols 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>

在控制台中显示错误,当我点击按钮,filepicker模式出现了。

The error displays in the console as soon as I click the button and the filepicker modal shows up.

我仍然可以选择和上传文件,但我不知道为什么会出现这种错误,因为我包括我的项目中的HTTP filepicker源。

I can still select and upload files, but I don't know why this error should occur since I am including the http filepicker source in my project.

感谢您的帮助,您可以提供。

Thank you for any help you can provide.

推荐答案

这是一个的称为铬/ WebKit的问题
这是发生在该通过JavaScript(由filepicker使用的技术)增加了一个闪光标签本身的任何跨域iframe中。

This is a known chrome/webkit issue. This is happening on any cross domain iframe that adds a flash tag to itself through JavaScript (technique used by filepicker).

从filepicker队最后的消息:他们正在对这种规避

Last news from filepicker team: They are working on circumventing this.

这篇关于filepicker.io的Javascript API调用导致不安全的JavaScript错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆