From 24d1add52e62184d06838c610c25031a82f95f06 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 11 Sep 2013 12:25:28 +0000 Subject: [PATCH] feature(dom) Loader: add responseType --- lib/client/dom.js | 3 +++ lib/client/storage/_filepicker.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index 20d3eb3f..f847d636 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -655,6 +655,9 @@ var CloudCmd, Util, DOM, CloudFunc; xhr.open(lType, pParams.url, true); + if (p.responseType) + xhr.responseType = p.responseType; + Events.add('readystatechange', function(pEvent) { if (xhr.readyState === 4 /* Complete */) { var lJqXHR = pEvent.target, diff --git a/lib/client/storage/_filepicker.js b/lib/client/storage/_filepicker.js index e29e08f4..936743b4 100644 --- a/lib/client/storage/_filepicker.js +++ b/lib/client/storage/_filepicker.js @@ -32,8 +32,9 @@ var CloudCmd, Util, DOM, $, filepicker; Util.log(FPFile); DOM.ajax({ - url : FPFile.url, - success : function(pData){ + url : FPFile.url, + responseType :'arraybuffer', + success : function(pData){ Util.exec(pCallBack, FPFile.filename, pData); } });