cleanup
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user