Update index.js
Browse files
index.js
CHANGED
@@ -147,7 +147,7 @@ app.post('/api/toanime', async (req, res) => {
|
|
147 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
148 |
}
|
149 |
})
|
150 |
-
app.post('/api/
|
151 |
try {
|
152 |
console.log(req.body)
|
153 |
const { images, denoise, scale, format, type, status } = req.body
|
@@ -404,7 +404,7 @@ async function processImage(image, denoise, scale, format, type) {
|
|
404 |
formData.append("scale", scale);
|
405 |
formData.append("format", format);
|
406 |
formData.append("type", type);
|
407 |
-
formData.append("file",
|
408 |
filename:
|
409 |
"images_" + random_numbers.toString().padStart(3, "0") + ".jpeg",
|
410 |
contentType: "image/jpeg",
|
|
|
147 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
148 |
}
|
149 |
})
|
150 |
+
app.post('/api/upscaler', async (req, res) => {
|
151 |
try {
|
152 |
console.log(req.body)
|
153 |
const { images, denoise, scale, format, type, status } = req.body
|
|
|
404 |
formData.append("scale", scale);
|
405 |
formData.append("format", format);
|
406 |
formData.append("type", type);
|
407 |
+
formData.append("file", image, {
|
408 |
filename:
|
409 |
"images_" + random_numbers.toString().padStart(3, "0") + ".jpeg",
|
410 |
contentType: "image/jpeg",
|