Skip to content

Better support for multipart/form-data file upload examples #241

Description

@billiegoose

Currently in the JS / Fetch example, it shows multipart file uploads like so:

image

This doesn't work as it just sends the string "logo.png" instead of the file.

A better example might be:

// HTML file input, chosen by user
const fileInputs = document.querySelectorAll('input[type="file"]')

form.append("file", fileInputs[0].files[0]);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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