Skip to content

Upload file with file;filename (multiple parameters) #197

@jaimesemp

Description

@jaimesemp

Hi, thanks a lot for this library.

I have been using it deeply, but I have some struggles with multipart/forms.

I want to change this part of the result request:

Content-Disposition: form-data; name="file"

to:

Content-Disposition: form-data; name="file"; filename="datasheet5.pdf"

I have tried the FormDataAddon, and the .body(formData) methods, but I have been unable to add this second parameter, in fact, I do not have any clue at all of how to achieve it.

I am using wretch in my custom library (I want to use it on backend & frontend)

Could any give me some hints?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions