Sirius\Upload\Handler::sanitizeFileName PHP Method

sanitizeFileName() protected method

Sanitize the name of the uploaded file by stripping away bad characters and replacing "invalid" characters with underscore _
protected sanitizeFileName ( string $name ) : string
$name string
return string
    protected function sanitizeFileName($name)
    {
        if ($this->sanitizerCallback) {
            return call_user_func($this->sanitizerCallback, $name);
        }
        return preg_replace('/[^A-Za-z0-9\\.]+/', '_', $name);
    }