Skip to content

Commit

Permalink
Fastify file interceptor for raw requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gnaaruag committed Jul 12, 2024
1 parent 0c567b6 commit 3bae13f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/interceptors/file-upload.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export function FastifyFileInterceptor(
next: CallHandler,
): Promise<Observable<any>> {
const ctx = context.switchToHttp();
const request = ctx.getRequest();
request.raw = request.raw || request;

await new Promise<void>((resolve, reject) =>
this.multer.single(fieldName)(
Expand Down

0 comments on commit 3bae13f

Please sign in to comment.