src/PHPDish/Component/Media/Manager/FileFactory.php
public function createFileFromUploadedFile(UploadedFile $uploadedFile)
    {
        $file = $this->isImage($uploadedFile) ? new Image() : new File();
        $file->setExtension($uploadedFile->guessExtension())
            ->setSize($uploadedFile->getSize())
            ->setContentType($uploadedFile->getMimeType())
            ->setContent(stream_for(fopen($uploadedFile->getRealPath(), 'r')))
            ->setKey($this->namer->transform($uploadedFile));

        return $file;
    }
public function createFileFromUploadedFile(UploadedFile $uploadedFile)
    {
        $file = $this->isImage($uploadedFile) ? new Image() : new File();
        $file->setExtension($uploadedFile->guessExtension())
            ->setSize($uploadedFile->getSize())
            ->setContentType($uploadedFile->getMimeType())
            ->setContent(stream_for(fopen($uploadedFile->getRealPath(), 'r')))
            ->setKey($this->namer->transform($uploadedFile));

        return $file;
    }
{@inheritdoc}