@@ -2,6 +2,7 @@
coverage
package-lock.json
.DS_Store
+**/.DS_Store
.env.local
.env.development.local
.env.test.local
@@ -21,7 +21,7 @@ app.all('*', (req, res, next) => {
res.header("Access-Control-Allow-Credentials", true); //可以带cookies
res.header("X-Powered-By", '3.2.1')
if (req.method == 'OPTIONS') {
- res.send(200);
+ res.sendStatus(200);
} else {
next();
}
@@ -112,7 +112,7 @@ export default class BaseComponent {
const fullName = imgName + path.extname(files.file.name);
const repath = './public/img/' + fullName;
try{
- await fs.rename(files.file.path, repath);
+ fs.renameSync(files.file.path, repath);
gm(repath)
.resize(200, 200, "!")
.write(repath, async (err) => {