Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1028 from owncloud/resolveType_blob
Browse files Browse the repository at this point in the history
Add handling for additional responseType 'blob'
  • Loading branch information
dschmidt authored Mar 18, 2022
2 parents b5df7ff + ed6c9b9 commit 3e22a67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/enhancement-resolve-type-blob
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions src/helperFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ class helpers {
body = await res.arrayBuffer()
break

case 'blob':
body = await res.blob()
break

default:
body = await res.text()
}
Expand Down

0 comments on commit 3e22a67

Please sign in to comment.