Skip to content

Is there a way we can explicit check if we shouldn't call getLengthSync? #196

@bitinn

Description

@bitinn

We use getLengthSync to add content-length automatically, but in the case where you have streams, you can't really call getLengthSync, you need to use getLength callback to figure out the content-length.

While I do like form-data to explicitly encourage using getLength in readme, having a way so that we don't call getLengthSync when it's not suitable would be great too.

Not that we can't fallback to getLength, but we rather not make this hack to support form-data too complex.

ref:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions