I have added this code in my blaze form template provide by the Filestack:
<script type="text/javascript" src="https://static.filestackapi.com/v3/filestack.js"></script>
<script>
var client = filestack.init('MY API KEY');
function showPicker() {
client.pick({
}).then(function(result) {
console.log(JSON.stringify(result.filesUploaded))
});
}
</script>
<input type="button" value="Upload" onclick="showPicker()" />
I am getting this errors:
project.js:27 Uncaught ReferenceError: filestack is not defined
When i click the button i get this error message:
VM13567:4 Uncaught TypeError: Cannot read property 'pick' of undefined
I have also tried this code:
Template.layout.onRendered(function () {
$('head').append('<script type="text/javascript" src="https://static.filestackapi.com/v3/filestack.js"></script>');
});
Anyone worked befor with Filestack with Meteor. Is there any Package or instruction/docs?