Dev Helpers
← Back

Read a multipart form field

Read a multipart form field using Node.js.

Open this example in the interactive library

Source code

import { Blob } from "node:buffer";
console.log(
  await (async () => {
    const f = new FormData();
    f.append("title", "draft");
    return (await new Response(f).formData()).get("title");
  })(),
);

Sample output

draft