public function makeFromFileInfo(SplFileInfo $data, $name = null, $mimeType = null)
    {
        $file = new SplFileInfoStorableFile;
        $file->setData($data);

        if (null !== $mimeType) {
            $file->setMimeType($mimeType);
        } else {
            $file->setMimeType(
                $this->mimeTypeHelper->guessMimeTypeForPath($data->getRealPath())
            );
        }

        if (empty($name)) {
            $name = pathinfo($data->getRealPath(), PATHINFO_BASENAME);
        }

        if (null !== $name) {
            $file->setName($name);
        }

        return $this->getReturnPreparedFile($file);
    }