fastify-file-interceptor
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "fastify-file-interceptor", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"main": "dist/index.js", | ||
@@ -46,3 +46,3 @@ "types": "dist/index.d.ts", | ||
"fastify-multer": "2.0.3", | ||
"multer": "1.4.5-lts", | ||
"multer": "1.4.5-lts.1", | ||
"tslib": "^2.2.0" | ||
@@ -49,0 +49,0 @@ }, |
@@ -1,13 +0,9 @@ | ||
## Installation | ||
#### Installation | ||
This libray for Nest.Js Application use FastifyAdapter that can't use | ||
This libray for Nest.Js Application use FastifyAdapter that can't use | ||
@UseInterceptor or UploadFile decorator this package has provide same functionality as Nest.Js Application use ExpressAdaper,Now it support @UseInterceptor for upload file | ||
### Warning | ||
FileFastifyInterceptor() may not be compatible with third party cloud providers like Google Firebase or others ,This package is base on fastify-multer | ||
#### Warning | ||
FileFastifyInterceptor() may not be compatible with third party cloud providers like Google Firebase or others,This package is base on fastify-multer | ||
### npm | ||
```shell | ||
$ npm install fastify-file-interceptor | ||
``` | ||
@@ -20,3 +16,3 @@ ### yarn | ||
--- | ||
@@ -40,5 +36,7 @@ | ||
//add this line | ||
app.register(contentParser); yarn add fastify-multer | ||
app.useStaticAsset({root: join(__dirname,"../../example")}) yarn add fastify-static | ||
// Note: add this line | ||
// yarn add fastify-multer | ||
// yarn add fastify-static | ||
app.register(contentParser); | ||
app.useStaticAsset({root: join(__dirname,"../../example")}) | ||
} | ||
@@ -205,3 +203,3 @@ bootstrap(); | ||
### Create url display image in browser | ||
#### We use interface FastifyRequest | ||
#### We use interface FastifyRequest | ||
@@ -211,3 +209,3 @@ | ||
```javascript | ||
/* file-mapper.ts */ | ||
/* file-mapper.ts */ | ||
@@ -249,7 +247,5 @@ import { FastifyRequest } from "fastify"; | ||
**Usage** | ||
### @nestjs/platform-fastify | ||
```typescript | ||
import { | ||
@@ -261,3 +257,3 @@ FastifyMulterModule, | ||
FilesFastifyInterceptor, | ||
diskStorage, | ||
diskStorage, | ||
memoryStorage, | ||
@@ -270,15 +266,2 @@ MulterFile | ||
### @nestjs/platform-express | ||
```typescript | ||
import { | ||
AnyFilesInterceptor, | ||
FileFieldsInterceptor, | ||
FileInterceptor, | ||
FilesInterceptor, | ||
} from "@nestjs/platform-express"; | ||
``` | ||
#### you can install example test on swagger | ||
[If it useful please give me some star on github :star: :star: :star: :star: :star: ](https://www.google.com) |
44165
261
+ Addedbusboy@1.6.0(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedmulter@1.4.5-lts.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstreamsearch@1.1.0(transitive)
+ Addedstring_decoder@1.1.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
Updatedmulter@1.4.5-lts.1