Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy addToBody and callback API #465

Merged
merged 7 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ npm i @fastify/multipart

## Usage

If you are looking for the documentation for the legacy callback-api please see [here](./callback.md).

```js
const fastify = require('fastify')()
const fs = require('fs')
Expand Down
194 changes: 0 additions & 194 deletions callback.md

This file was deleted.

30 changes: 0 additions & 30 deletions examples/example-legacy-validation.js

This file was deleted.

37 changes: 0 additions & 37 deletions examples/example-legacy.js

This file was deleted.

12 changes: 0 additions & 12 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ declare module "fastify" {
options?: Omit<BusboyConfig, "headers">
) => AsyncIterableIterator<fastifyMultipart.Multipart>;

// legacy
multipart: (
handler: MultipartHandler,
next: (err: Error) => void,
options?: Omit<BusboyConfig, "headers">
) => Busboy;

// Stream mode
file: (
options?: Omit<BusboyConfig, "headers">
Expand Down Expand Up @@ -110,11 +103,6 @@ declare namespace fastifyMultipart {
}

export interface FastifyMultipartBaseOptions {
/**
* Append the multipart parameters to the body object
*/
addToBody?: boolean;

/**
* Add a shared schema to validate the input fields
*/
Expand Down
Loading