src/Leevel/Http/FileBag.php
public function set(string $key, $value): void
    {
        if (!is_array($value) && !$value instanceof UploadedFile) {
            $e = 'An uploaded file must be an array or an instance of UploadedFile.';

            throw new InvalidArgumentException($e);
        }

        parent::set($key, $this->convertFile($value));
    }
public function set(string $key, $value): void
    {
        if (!is_array($value) && !$value instanceof UploadedFile) {
            $e = 'An uploaded file must be an array or an instance of UploadedFile.';

            throw new InvalidArgumentException($e);
        }

        parent::set($key, $this->convertFile($value));
    }
{@inheritdoc}