github samchon/nestia v2.5.3

latest releases: v3.18.0, v3.17.0, v3.16.0...
9 months ago

New decorator function @TypedFormData.Body() for multipart/form-data content typed requeest body.

https://nestia.io/docs/core/TypedFormData/

import { TypedFormData, TypedRoute } from "@nestia/core";
import { Controller } from "@nestjs/common";
 
@Controller("bbs/articles")
export class BbsArticlesController {
  @TypedRoute.Post()
  public async create(
    @TypedFormData.Body() input: IBbsArticleCreate,
  ): Promise<void> {
    input;
  }
}
 
interface IBbsArticleCreate {
  title: string;
  body: string | null;
  thumbnail?: File | undefined;
  files: File[];
  tags: string[];
}

What's Changed

  • Close #763 - @TypedMultipart.Body() by @samchon in #779
  • Determine the new decorator name as @TypedFormData.Body() by @samchon in #780
  • Roll @nestia/migrate back to the exrpess for @TypedFormData.Body() by @samchon in #781

Full Changelog: v2.5.1...v2.5.3

Don't miss a new nestia release

NewReleases is sending notifications on new releases.