Spaces:
Paused
Paused
Update index.js
Browse files
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')
|