public function getFileName(
        $source_name,
        $type,
        $tmp_name,
        $index,
        $content_range,
        FileUpload $upload
    ) {
        $filename = pathinfo($source_name, PATHINFO_FILENAME);
        $extension = pathinfo($source_name, PATHINFO_EXTENSION);

        $md5ConcatenatedName = md5($filename) . "." . $extension;

        if ($upload->getFileSystem()
                ->doesFileExist(
                    $upload->getPathResolver()->getUploadPath($md5ConcatenatedName)
                ) &&
            $this->allowDuplicate === false
        ) {
            $upload->getFileContainer()->error = "File already exist in the upload directory. 
            Please upload another file or change it's name";

            return false;
        }

        return $md5ConcatenatedName;
    }