Skip to content

Commit 0699e17

Browse files
committed
framework: fix blob response (#1012)
1 parent f53dd45 commit 0699e17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

framework/framework/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default (logger, xff, xhost) => async (ctx: KoaContext, next: Next) => {
117117
ctx.response.status = 302;
118118
ctx.redirect(response.redirect);
119119
} else if (response.body) {
120-
ctx.body = response.body;
120+
ctx.body = response.body instanceof Blob ? Buffer.from(await response.body.arrayBuffer()) : response.body;
121121
ctx.response.status = response.status || 200;
122122
ctx.response.type = response.type
123123
|| (request.json

0 commit comments

Comments
 (0)