Skip to content

Commit

Permalink
fix image name setter not workin #141
Browse files Browse the repository at this point in the history
  • Loading branch information
samayo committed May 5, 2024
1 parent d235db2 commit 5a65c99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bulletproof.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,11 @@ public function setStorage($dir = 'uploads', $permission = 0666)
*/
protected function constraintValidator()
{
// handle naming of file
$this->setName();

// if name is provided use it, otherwise generate a unique name
if (!$this->name) {
$this->setName();
}

/* check image for valid mime types and return mime */
$this->getImageMime($this->_files['tmp_name']);
Expand Down

0 comments on commit 5a65c99

Please sign in to comment.