From ed6c9b9472652c6206899d394d8de9d861a1c8c1 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 18 Mar 2022 15:59:41 +0100 Subject: [PATCH] Add handling for additional responseType 'blob' --- changelog/unreleased/enhancement-resolve-type-blob | 5 +++++ src/helperFunctions.js | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 changelog/unreleased/enhancement-resolve-type-blob diff --git a/changelog/unreleased/enhancement-resolve-type-blob b/changelog/unreleased/enhancement-resolve-type-blob new file mode 100644 index 000000000..a592e8cc9 --- /dev/null +++ b/changelog/unreleased/enhancement-resolve-type-blob @@ -0,0 +1,5 @@ +Enhancement: Add blob resolveType + +We now support blob as resolveType for requests in addition to text and arrayBuffer. + +https://github.com/owncloud/owncloud-sdk/pull/1028 diff --git a/src/helperFunctions.js b/src/helperFunctions.js index d81eb4095..c3334026a 100644 --- a/src/helperFunctions.js +++ b/src/helperFunctions.js @@ -345,6 +345,10 @@ class helpers { body = await res.arrayBuffer() break + case 'blob': + body = await res.blob() + break + default: body = await res.text() }