piskel/js/utils/FileUtils.js

13 lines
290 B
JavaScript
Raw Normal View History

2013-10-17 01:14:41 +04:00
(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);
}
};
})();