This commit is contained in:
2026-05-09 13:41:07 -03:00
parent ff3db71084
commit 7b5d4afd07
4 changed files with 8 additions and 8 deletions
-4
View File
@@ -23,10 +23,6 @@ export function validateImage(buffer, limits) {
if (image.width * image.height > limits.maxPixels) {
throw new HttpError(413, 'Image has too many pixels.');
}
if (limits.requireSquare && image.width !== image.height) {
throw new HttpError(422, 'Image must be square.');
}
return { ...image, byteSize: buffer.length };
}