aurelia-files
aurelia-files copied to clipboard
Version 0.1.1
Following the provided example (copy-paste), I get the following error:
Uncaught Error: You must specify an onLoaded callback at minimum
Can you provide the code you are using as the examples seem to work fine and they use the same source code as the module.
Simply: .js
textFileLoadedCallback(file, data) {
document.getElementById('loaded_text_file').innerHTML = data;
};
.html
<label for="text_file">Load Single Text File</label>
<input type="file" id="text_file"
files="on-loaded.bind: textFileLoadedCallback; file-filter.bind: 'text.*|application.*'; read-as.bind: 'text';" />
<div id="loaded_text_file"></div>
And main.js
aurelia.use.plugin('aurelia-files');
just to confirm your js stuff is within a class/viewmodel which is assigned right? as that error is because you have either not passed it a method (Which your code says you have) or the value you provided it is falsey (undefined, null etc).
If you can post an isolated repro I am happy to take a look, the code is pretty trivial so if you want to just open up the plugins attribute method and put a console.log in to check what the binding you are passing in is, if its not falsey then there is something more odd happening.