mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Add minimum artwork dimensions
This commit is contained in:
parent
3d85a6d936
commit
5b6a334dd0
4 changed files with 21 additions and 2 deletions
|
@ -365,7 +365,13 @@ class Artwork extends PropertiesBase{
|
|||
}
|
||||
|
||||
if(!is_uploaded_file($uploadedFile['tmp_name'])){
|
||||
throw new Exceptions\InvalidImageUploadException();
|
||||
$error->Add(new Exceptions\InvalidImageUploadException());
|
||||
}
|
||||
|
||||
// Check for minimum dimensions
|
||||
list($imageWidth, $imageHeight) = getimagesize($uploadedFile['tmp_name']);
|
||||
if(!$imageWidth || !$imageHeight || $imageWidth < COVER_ARTWORK_IMAGE_MINIMUM_WIDTH || $imageHeight < COVER_ARTWORK_IMAGE_MINIMUM_HEIGHT){
|
||||
$error->Add(new Exceptions\ArtworkImageDimensionsTooSmallException());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue