src/Sulu/Bundle/MediaBundle/Media/Manager/MediaManager.php
private function getNormalizedFileName($originalFileName)
    {
        if (false !== strpos($originalFileName, '.')) {
            $pathParts = pathinfo($originalFileName);
            $fileName = $this->pathCleaner->cleanup($pathParts['filename']);
            $fileName .= '.' . $pathParts['extension'];
        } else {
            $fileName = $this->pathCleaner->cleanup($originalFileName);
        }

        return $fileName;
    }
private function getNormalizedFileName($originalFileName)
    {
        if (false !== strpos($originalFileName, '.')) {
            $pathParts = pathinfo($originalFileName);
            $fileName = $this->pathCleaner->cleanup($pathParts['filename']);
            $fileName .= '.' . $pathParts['extension'];
        } else {
            $fileName = $this->pathCleaner->cleanup($originalFileName);
        }

        return $fileName;
    }
private function getNormalizedFileName ( $ originalFileName ) { if ( false !== strpos ( $ originalFileName , '.' ) ) { $ pathParts = pathinfo ( $ originalFileName ) ; $ fileName = $ this -> pathCleaner -> cleanup ( $ pathParts [ 'filename' ] ) ; $ fileName .= '.' . $ pathParts [ 'extension' ] ; } else { $ fileName = $ this -> pathCleaner -> cleanup ( $ originalFileName ) ; } return $ fileName ; }
Returns file name without special characters and preserves file extension.

@param $originalFileName

@return string
Returns file name without special characters and preserves file extension .