src/MediaUploader.php
private function verifyExtension($extension)
    {
        $allowed = $this->config['allowed_extensions'];
        if (! empty($allowed) && ! in_array(strtolower($extension), $allowed)) {
            throw FileNotSupportedException::extensionRestricted(strtolower($extension), $allowed);
        }

        return $extension;
    }
private function verifyExtension($extension)
    {
        $allowed = $this->config['allowed_extensions'];
        if (! empty($allowed) && ! in_array(strtolower($extension), $allowed)) {
            throw FileNotSupportedException::extensionRestricted(strtolower($extension), $allowed);
        }

        return $extension;
    }
private function verifyExtension ( $ extension ) { $ allowed = $ this -> config [ 'allowed_extensions' ] ; if ( ! empty ( $ allowed ) && ! in_array ( strtolower ( $ extension ) , $ allowed ) ) { throw FileNotSupportedException :: extensionRestricted ( strtolower ( $ extension ) , $ allowed ) ; } return $ extension ; }
Ensure that the file's extension is allowed.
@param  string $extension
@return string
@throws \Plank\Mediable\Exceptions\MediaUpload\FileNotSupportedException If the file extension is not allowed
Ensure that the file s extension is allowed .