From 86564e37ae9433d9678e0c00c66e342afd8884b0 Mon Sep 17 00:00:00 2001 From: Chris Price Date: Sun, 17 Aug 2014 16:50:20 -0400 Subject: Add support for reading .docx files from Buffer instances --- lib/unzip.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/unzip.js b/lib/unzip.js index 97db80f..51c34a3 100644 --- a/lib/unzip.js +++ b/lib/unzip.js @@ -12,6 +12,8 @@ var readFile = promises.promisify(fs.readFile); function openZip(options) { if (options.path) { return readFile(options.path).then(zipfile.openArrayBuffer); + } else if (options.buffer) { + return zipfile.openArrayBuffer(options.buffer); } else if (options.file) { return options.file; } else { -- cgit v1.2.3