1.0.2 • Published 2 years ago

@hyoretsu/nest-decorators v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

A collection of useful decorators for Nest.js

  • IsOptional()

How is this different from the default IsOptional? This one also checks for undefined and empty strings.

  • Multipart()

This is a decorator written for Fastify to easily upload files (while also validating fields just like @Body() with a depth of 1). Requires @fastify/multipart to be setup prior to using it.

You need environment variables to use it.

  • STORAGE_DRIVER = "local" | "s3"

If using disk storage:

  • UPLOAD_FOLDER

If using Amazon S3:

  • AWS_ACCESS_KEY_ID
  • AWS_BUCKET
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION