public function setStream(StreamInterface $stream): UploadedFile
    {
        if ($this->hasMoved()) {
            throw new \RuntimeException(sprintf('Uploaded file "%s" has already moved', $this->file));
        }

        $this->stream = $stream;

        return $this;
    }