From ca45e3533dcd4c37670153260a07f844034703d5 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 23 Jun 2016 16:38:24 +0200 Subject: [PATCH] pass loaded file to callback when importing --- www/common/cryptpad-common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 53506f8f5..af5b4d250 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -51,7 +51,7 @@ define([ $files.on('change', function (e) { var file = e.target.files[0]; var reader = new FileReader(); - reader.onload = function (e) { f(e.target.result); }; + reader.onload = function (e) { f(e.target.result, file); }; reader.readAsText(file, type); }); };