diff options
| author | Chris Price <studiochris@users.noreply.github.com> | 2014-08-17 16:50:20 -0400 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-08-18 12:41:47 +0100 |
| commit | 86564e37ae9433d9678e0c00c66e342afd8884b0 (patch) | |
| tree | 80a627e054185299e5be13a687b3907c7244ad93 /lib | |
| parent | 90f0b6d73e27a5490648523648b426bcab9b602f (diff) | |
Add support for reading .docx files from Buffer instances
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/unzip.js | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |
