        let idParamName: String? = {% if method.parameters.all | filter(p => p.isUploadID) | length > 0 %}{% for parameter in method.parameters.all | filter(parameter => parameter.isUploadID) %}"{{ parameter.name }}"{% endfor %}{% else %}nil{% endif %}

{% for parameter in method.parameters.all %}
{% if parameter.type == 'file' %}
        let paramName = "{{ parameter.name }}"
{% endif %}
{% endfor %}
        return try await client.chunkedUpload(
            path: apiPath,
            headers: &apiHeaders,
            params: &apiParams,
            paramName: paramName,
            idParamName: idParamName,
{% if method.responseModel %}
            converter: converter,
{% endif %}
            onProgress: onProgress
        )