Import from file

This commit is contained in:
jdescottes
2013-10-16 23:14:41 +02:00
parent a8b42a35da
commit 1156008213
5 changed files with 100 additions and 6 deletions

13
js/utils/FileUtils.js Normal file
View File

@ -0,0 +1,13 @@
(function () {
var ns = $.namespace('pskl.utils');
ns.FileUtils = {
readFile : function (file, callback) {
var reader = new FileReader();
reader.onload = function(event){
callback(event.target.result);
};
reader.readAsDataURL(file);
}
};
})();