piskel/zoom/js/utils/FileUtils.js
2013-11-02 10:19:38 +01: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);
}
};
})();