Skip to content

form-data-parser v0.7.0

Compare
Choose a tag to compare
@github-actions github-actions released this 25 Jan 18:57
· 46 commits to main since this release
  • BREAKING CHANGE: Override parseFormData signature so the upload handler is always last in the argument list. parserOptions are now an optional 2nd arg.
import { parseFormData } from '@mjackson/form-data-parser';

// before
await parseFormData(
  request,
  (fileUpload) => {
    // ...
  },
  { maxFileSize },
);

// after
await parseFormData(request, { maxFileSize }, (fileUpload) => {
  // ...
});
  • Upgrade multipart-parser to v0.8 to fix an issue where errors would crash the process when maxFileSize was exceeded (see #28)
  • Add an example of how to use form-data-parser together with file-storage to handle multipart uploads on Node.js
  • Expand FileUploadHandler interface to support returning Blob from the upload handler, which is the superclass of File