nagose commited on
Commit
84cfcc7
1 Parent(s): d185783

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
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(resizedImageBuffer);
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(base64Image);
65
  } catch (error) {
66
  console.error('压缩图像时出错:', error);
67
  res.status(500).send('压缩图像时出错');