piskel/js/utils/FileUtils.js
2013-10-16 23:14:41 +02:00

13 lines
290 B
JavaScript

(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);
}
};
})();