1.1.0 • Published 1 month ago

@universal-packages/express-controllers-fileupload v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Express controllers fileupload

npm version Testing codecov

Express fileupload middleware for universal controllers.

Install

npm install @universal-packages/express-controllers-fileupload

npm install @universal-packages/express-controllers

Global methods

setFileUploadOptions(options: fileUpload.Options)

Set up options for the fileupload middleware, so you don't have to repeat them in every action.

import { setFileUploadOptions } from '@universal-packages/express-controllers-fileupload'

setFileUploadOptions({ useTempFiles: true })

Hooks

@UseFileUpload([options: fileUpload.Options])

Set a particular action to use the file upload middleware.

import { BaseController, Controller, Post } from '@universal-packages/express-controllers'
import { UseFileUpload } from '@universal-packages/express-controllers-fileupload'

@Controller('good')
export default class GoodController extends BaseController {
  @UseFileUpload()
  @Post()
  async action() {
    this.request.files
  }
}

Typescript

This library is developed in TypeScript and shipped fully typed.

Contributing

The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.

License

MIT licensed.

1.1.0

1 month ago

1.0.16

2 months ago

1.0.11

2 months ago

1.0.10

2 months ago

1.0.15

2 months ago

1.0.14

2 months ago

1.0.13

2 months ago

1.0.12

2 months ago

1.0.9

2 months ago

1.0.8

2 months ago

1.0.7

3 months ago

1.0.6

3 months ago

1.0.2

8 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

8 months ago

1.0.1

1 year ago

1.0.0

1 year ago