Remix
Remix
remix/multipart-parser/node · FunctionView Source

parseMultipart

Summary

Parse a multipart/* Node.js Buffer and yield each part as a MultipartPart object.

Note: This is a low-level API that requires manual handling of the content and boundary. If you're building a web server, consider using parseMultipartRequest instead.

Signature

function parseMultipart(
  message:
    | Buffer<ArrayBufferLike>
    | Iterable<Buffer<ArrayBufferLike>, any, any>,
  options: ParseMultipartOptions,
): Generator<MultipartPart, void, unknown>;

Parameters

message

The multipart message as a Buffer or an iterable of Buffer chunks

options

Options for the parser

Returns

A generator yielding MultipartPart objects