こんにちは、ピッカーを機能させようとしています。ファイルは、Chrome のコンソールで次の 2 つのエラーを返すページによって S3 バケットに検索をアップロードします。
安全でない JavaScript が URL https://www.filepicker.io/dialog/open/?key=AJNd2634XTeyMNPGjr51mz&id=1350365313264&referrer=localhost&iframe=true&s=のフレームから URL file://localhost/Users/ben/fpiotest.html のフレームにアクセスしようとしています1,3,2,12&multi=true&m=image/ *#/computer/. ドメイン、プロトコル、およびポートが一致する必要があります。swfobject_src.js:1
Uncaught FilepickerException: Invalid file to get metadata for: 0. filepicker url または FPFile オブジェクトではありません。ファイルピッカー.js:1
私のページのコード全体は次のとおりです。
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="jquery-1.8.2.js"></script>
<!-- Adds the Filepicker.io javascript library to the page -->
<script src="https://api.filepicker.io/v1/filepicker.js"></script>
<script src="https://api.filepicker.io/v1/filepicker_debug.js"></script>
<script type="text/javascript">
//Seting up Filepicker.io with your api key
filepicker.setKey('<removed>');
</script>
</head>
<button style="margin-top: 35px" class="btn btn-primary" data-name="complex get"
onClick="filepicker.pickMultiple(
{
mimetype: 'image/*',
'container':'modal',
'metadata': true,
'services': ['COMPUTER', 'FACEBOOK', 'DROPBOX', 'FLICKR']
},
function(files){
var str = '';
//$('#multiResult').html(JSON.stringify(files));
for(var file in files) {
filepicker.stat(file, {size: true, filename: true, width: true, height: true, uploaded: true},
function(metadata){str += JSON.stringify(metadata);});
}
alert(str);
},
function(err){alert('error: ' + err);});">Run Code</button>
<!--function(response){$('#multiResult').html(JSON.stringify(response))});">Run Code</button>-->
<div class="row-fluid">
<div class="span2"><strong>Result:</strong></div>
<div class="span10">
<pre id="multiResult"></pre>
</div>
</div>
</html>