aboutsummaryrefslogtreecommitdiff
path: root/lib/documents.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/documents.js')
-rw-r--r--lib/documents.js5
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
};