fixed removing before moving
This commit is contained in:
parent
100b060aa7
commit
f1b569a9ec
|
@ -75,7 +75,6 @@ class UserController {
|
||||||
|
|
||||||
const image = await Jimp.read(tempPath);
|
const image = await Jimp.read(tempPath);
|
||||||
if (image.bitmap.width != 64 || image.bitmap.height != 64) {
|
if (image.bitmap.width != 64 || image.bitmap.height != 64) {
|
||||||
fs.unlinkSync(targetPath);
|
|
||||||
return res.status(400).send('This does not look like a minecraft skin.');
|
return res.status(400).send('This does not look like a minecraft skin.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +97,6 @@ class UserController {
|
||||||
|
|
||||||
const image = await Jimp.read(tempPath);
|
const image = await Jimp.read(tempPath);
|
||||||
if ((image.bitmap.width != 64 || image.bitmap.height != 32) && (image.bitmap.width != 128 || image.bitmap.height != 64)) {
|
if ((image.bitmap.width != 64 || image.bitmap.height != 32) && (image.bitmap.width != 128 || image.bitmap.height != 64)) {
|
||||||
fs.unlinkSync(tempPath);
|
|
||||||
return res.status(400).send('This does not look like a minecraft cape.');
|
return res.status(400).send('This does not look like a minecraft cape.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue