I've written following code in order to implement filepicker.io into my HTML page but somehow I'm not able to do that. Also the firebug console is not showing me any error or warning for it.
I've referred following question for this :
filepicker.io -- easy implementation
Following is the jsFiddle link that I referred :
http://jsfiddle.net/krystiangw/61861wsv/
For your reference following is the code from my HTML file :
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js">
</script>
<script>
$(document).ready(function(){
filepicker.setKey('AFJvi8ODOSrOayoCb3swoz');
document.getElementById('filepickerBtn').onclick = selectFile;
function selectFile(){
filepicker.pick(
// picker options
{
extension: '.docx',
},
onSuccessCallback
);
};
function onSuccessCallback(Blob){
document.getElementById('postName').textContent = Blob.filename;
document.getElementById('postlink').textContent = Blob.url;
document.getElementById('results').textContent = JSON.stringify(Blob);
};
});
</script>
</head>
<body>
<div class="container">
<h3>Filepicker example</h3>
<p>
<button id="filepickerBtn" class="btn btn-primary">
Select MS-WORD file
</button>
</p>
<p>Filename: <span id="postName"></span></p>
<p>Filelink: <span id="postlink"></span></p>
<p>Results: <pre id="results">Upload file to see results</pre></p>
</div>
</body>
</html>
Please guide and correct me where I'm making the mistake in integrating filepicker.io into the HTML.
One more difference you'll observer in the fiddle and my code is, in the fiddle they have included Bootstrap 3.2.0 but I've not because I don't know how to include into my HTML. That's the only difference.
Thanks. Waiting for your precious replies.