FormDataInput

import { FormDataInput } from "jsr:@ende/http/unstable-formdata-encoder-stream";

interface ยท experimental

interface FormDataInput

The input that can be passed to a FormDataEncoderStream.

Properties

name

name: string

A string containing the key used for the form data entry. While all UTF-8 characters should work, it is encouraged to only use ascii. The value of name should not generally be exposed to the user.

value

value: string | Blob | ReadableStream<Uint8Array>

The value of the form data entry.

contentType

contentType?: string

The content type of the form data entry. Defaults to:

  • text/plain when a string is passed to value.
  • application/octet-stream when a Blob is passed to value and the Blob doesn't have its own type.
  • application/octet-stream when a ReadableStream<Uint8Array> is passed to value.

filename

filename?: string

The filename of the form data entry. Defaults to "blob" when a Blob or ReadableStream<Uint8Array> is passed to value.

Source