protected function getFileName($file)
{
if ($this->generateNewName) {
return $this->generateNewName instanceof Closure ? call_user_func($this->generateNewName, $file) : $this->generateFileName($file);
} else {
return $this->sanitize($file->name);
}
}