Skip to content

Commit

Permalink
Conver UInt8Array to Buffer to avoid being treated as a JSON response
Browse files Browse the repository at this point in the history
  • Loading branch information
jihchi committed Aug 17, 2024
1 parent 6223db3 commit f7aee22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/img.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const img = async (ctx, page, size) => {

// dynamically set media type
ctx.type = `image/${type}`;
ctx.body = image;
ctx.body = Buffer.from(image);
};

module.exports = renderImgOrSvg(img);

0 comments on commit f7aee22

Please sign in to comment.