protected function moveFile(UploadedFile $file)
    {
        $path = $this->getUploadPath();
        $name = $this->generateFilename($path, $file->guessExtension());

        while (file_exists($path.$name)) {
            $name = $this->generateFilename($extension);
        }

        $file->move($path, $name);
        return $name;
    }