private static function createUploadedFile(array $value)
    {
        // Flatten file if is nested.
        if (is_array($value['tmp_name'])) {
            return static::getFlattenFileData($value);
        }

        return new UploadedFile(
            $value['tmp_name'],
            $value['size'],
            $value['error'],
            $value['name'],
            $value['type']
        );
    }