Spaces:
Sleeping
Sleeping
Update index.js
Browse files
index.js
CHANGED
@@ -61,7 +61,7 @@ app.get('/resize', async (req, res) => {
|
|
61 |
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
62 |
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
63 |
res.setHeader('Access-Control-Max-Age', '86400');
|
64 |
-
res.send(
|
65 |
} catch (error) {
|
66 |
console.error('压缩图像时出错:', error);
|
67 |
res.status(500).send('压缩图像时出错');
|
|
|
61 |
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
62 |
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
63 |
res.setHeader('Access-Control-Max-Age', '86400');
|
64 |
+
res.send(resizedImageBuffer);
|
65 |
} catch (error) {
|
66 |
console.error('压缩图像时出错:', error);
|
67 |
res.status(500).send('压缩图像时出错');
|