aurelia-files
aurelia-files copied to clipboard
A simple attribute plugin for Aurelia to simplify loading files with the HTML5 FileReader
I am in the process of upgrading Aurelia and adopting webpack at the same time. I have one error left to fix and it seems to be that `aurelia-files` does...
If `on-loaded.bind` is used, the callback does not have access to its view-model's `this`. Using `.call` fixes that: **file-reader-helper.js** ``` onLoaded({file, contents: fileLoadedEvent.target.result}); ``` **consumer.html** ``` ``` However, note that...
Can support typescript ?
i have found this: https://www.danyow.net/binding-to-file-inputs-with-aurelia/ looks like this codebase can be simplified by taking advantage of aurelia's to work with files in a straight forward manner without requiring explicit DOM...
Following the provided example (copy-paste), I get the following error: `Uncaught Error: You must specify an onLoaded callback at minimum`