From 181f86405c77d8464a59fb03c50f82acce89d550 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 10 Feb 2014 03:24:18 -0500 Subject: [PATCH] refactor(filepicker) uploadFile --- lib/client/storage/_filepicker.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/client/storage/_filepicker.js b/lib/client/storage/_filepicker.js index ac3f79e5..8c9387ed 100644 --- a/lib/client/storage/_filepicker.js +++ b/lib/client/storage/_filepicker.js @@ -15,18 +15,19 @@ var CloudCmd, Util, DOM, filepicker; } - this.uploadFile = function(pParams, pCallBack) { - var lContent = pParams.data, - lName = pParams.name; + this.uploadFile = function(params) { + var content = params.data, + name = params.name, + log = Util.log.bind(Util); - filepicker.store(lContent, { + filepicker.store(content, { mimetype: '', - filename: lName + filename: name }, - function(pFPFile) { - Util.log(pFPFile); + function(fpFile) { + log(fpFile); - filepicker.exportFile(pFPFile, Util.log, Util.log); + filepicker.exportFile(fpFile, log, log); }); };