mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
Fix artwork validation logic
This commit is contained in:
parent
78f31ceb6b
commit
c51fe594bf
2 changed files with 6 additions and 2 deletions
|
@ -509,8 +509,8 @@ class Artwork{
|
|||
}
|
||||
}
|
||||
|
||||
if($this->MimeType === null && !$error->Has('Exceptions\InvalidImageUploadException')){
|
||||
// Only notify of wrong mimetype if there is no other problem with the uploaded image
|
||||
if($imagePath !== null && $this->MimeType === null && !$error->Has('Exceptions\InvalidImageUploadException')){
|
||||
// Only notify of wrong mimetype if there are no other problem with the uploaded image
|
||||
$error->Add(new Exceptions\InvalidMimeTypeException());
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,10 @@ try{
|
|||
$artwork->Status = $newStatus;
|
||||
}
|
||||
|
||||
if(HttpInput::File('artwork-image') === null){
|
||||
$artwork->MimeType = $originalArtwork->MimeType;
|
||||
}
|
||||
|
||||
$artwork->Save(HttpInput::File('artwork-image'));
|
||||
|
||||
$_SESSION['artwork'] = $artwork;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue