diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/documents.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/documents.js b/lib/documents.js index 9088ed9..cc6a2a3 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -168,6 +168,11 @@ function Image(options) { readAsBase64String: function() { return options.readImage("base64"); }, + readAsBuffer: function() { + return options.readImage().then(function(arrayBuffer) { + return Buffer.from(arrayBuffer); + }); + }, altText: options.altText, contentType: options.contentType }; |
