Khrisna commited on
Commit
52f5da4
·
1 Parent(s): 1607fde

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -1
index.js CHANGED
@@ -130,7 +130,8 @@ app.post('/api/waifu2x', async (req, res) => {
130
  if (!urlRegex.test(images)) {
131
  const data_img = await axios.request({
132
  method: "GET",
133
- url: images
 
134
  })
135
  const response = await waifu2x(data_img, format)
136
  res.setHeader('Content-Type', 'image/jpg')
 
130
  if (!urlRegex.test(images)) {
131
  const data_img = await axios.request({
132
  method: "GET",
133
+ url: images,
134
+ responseType: "arraybuffer"
135
  })
136
  const response = await waifu2x(data_img, format)
137
  res.setHeader('Content-Type', 'image/jpg')