Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-file-interceptor

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-file-interceptor - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

1

fastify-file-interceptor/src/index.ts

@@ -7,2 +7,1 @@ export { FileFastifyInterceptor } from "./multer/interceptor/file-fastify-interceptor";

export { diskStorage, memoryStorage } from "multer";
export { contentParser } from "fastify-multer";

2

package.json
{
"name": "fastify-file-interceptor",
"version": "1.0.2",
"version": "1.0.3",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

@@ -12,6 +12,3 @@ **Installation**

```javascript
you can import from both source
1- import { contentParser } from 'fastify-multer';
2- import { contentParser } from 'fastify-file-interceptor';
import { contentParser } from 'fastify-multer';
import 'reflect-metadata';

@@ -159,4 +156,3 @@ import { FastifyAdapter,NestFastifyApplication } from '@nestjs/platform-fastify';

</br>
> -Why we using FastifyAdatper then define interface Request of Express instead FastifyRequest on @Req() decorator ? because I wrote this package is reply on fastify-multer and fastify-multer reply on express-multer the "req" is fastify,
> another reason function fileFiler and filename inside diskStorage use Request interface Express
> -Why we using FastifyAdatper then define interface Request from "express" instead interface FastifyRequest from "fastify" ? because function fileFiler and filename inside diskStorage use Request interface Express

@@ -250,3 +246,3 @@ >file-upload-util.ts

**you can install example test on swagger**
**Example** <a href="https://github.com/chanphiromsok/exmaple-fastify-file-interceptor">https://github.com/chanphiromsok/exmaple-fastify-file-interceptor</a>
**Example** <a href="https://github.com/chanphiromsok/example-fastify-file-interceptor">https://github.com/chanphiromsok/example-fastify-file-interceptor</a>
**I hope creator NestJs add this feature to "@nestjs/platform-fastify"**

@@ -20,3 +20,3 @@ {

},
"exclude": ["dist"]
"exclude": ["dist", "exmaple-fastify-file-interceptor"]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc