public function upload(MediaInterface $media, UploadedFile $fileInfo)
    {
        // if there is an error when moving the file, an exception will
        // be automatically thrown by move(). This will properly prevent
        // the entity from being persisted to the database on error
        $fileInfo->move($this->getUploadRootDir(), $media->getPath());
    }
public function upload(MediaInterface $media, UploadedFile $fileInfo)
    {
        // if there is an error when moving the file, an exception will
        // be automatically thrown by move(). This will properly prevent
        // the entity from being persisted to the database on error
        $fileInfo->move($this->getUploadRootDir(), $media->getPath());
    }
{@inheritdoc}