src/Leevel/Http/Psr2Leevel.php
protected function createUploadedFile(UploadedFileInterface $psrUploadedFile): UploadedFile
    {
        $temporaryPath = '';
        $clientFileName = '';

        if (UPLOAD_ERR_NO_FILE !== $psrUploadedFile->getError()) {
            $temporaryPath = $this->getTemporaryPath();
            $psrUploadedFile->moveTo($temporaryPath);

            $clientFileName = $psrUploadedFile->getClientFilename();
        }

        return new UploadedFile(
            $temporaryPath,
            $clientFileName ?: '',
            $psrUploadedFile->getClientMediaType(),
            $psrUploadedFile->getError()
        );
    }
protected function createUploadedFile(UploadedFileInterface $psrUploadedFile): UploadedFile
    {
        $temporaryPath = '';
        $clientFileName = '';

        if (UPLOAD_ERR_NO_FILE !== $psrUploadedFile->getError()) {
            $temporaryPath = $this->getTemporaryPath();
            $psrUploadedFile->moveTo($temporaryPath);

            $clientFileName = $psrUploadedFile->getClientFilename();
        }

        return new UploadedFile(
            $temporaryPath,
            $clientFileName ?: '',
            $psrUploadedFile->getClientMediaType(),
            $psrUploadedFile->getError()
        );
    }
创建 Leevel 上传对象.

@param \Psr\Http\Message\UploadedFileInterface $psrUploadedFile

@return \Leevel\Http\UploadedFile