fastify-multipart icon indicating copy to clipboard operation
fastify-multipart copied to clipboard

migrate out of deprecated API.

Open climba03003 opened this issue 4 years ago • 0 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the bug has not already been reported

Fastify version

3.x.x

Plugin version

No response

Node.js version

14.x

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

20.04

Description

Migrate out of deprecated API.

https://github.com/fastify/fastify-multipart/blob/37165757947857cd8b3977ba362c4536fd2d837e/index.js#L36-L44

request.multipart is actually deprecated, it should not be used inside this plugin.

Reported by Jones on Discord Server.

Steps to Reproduce

Register the plugin with addToBody.

fastify.register(multipart, {
  addToBody: true,
});

Expected Behavior

No deprecation warning.

climba03003 avatar Oct 31 '21 16:10 climba03003