Skip to content

Commit 365c40b

Browse files
fix(platform-fastify): fix streamable file processing
1 parent 1d35d7b commit 365c40b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/platform-fastify/adapters/fastify-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,14 @@ export class FastifyAdapter<
280280
fastifyReply.status(statusCode);
281281
}
282282
if (body instanceof StreamableFile) {
283-
body = body.getStream();
284283
const streamHeaders = body.getHeaders();
285284
if (fastifyReply.getHeader('Content-Type') === undefined) {
286285
fastifyReply.header('Content-Type', streamHeaders.type);
287286
}
288287
if (fastifyReply.getHeader('Content-Disposition') === undefined) {
289288
fastifyReply.header('Content-Disposition', streamHeaders.disposition);
290289
}
290+
body = body.getStream();
291291
}
292292
return fastifyReply.send(body);
293293
}

0 commit comments

Comments
 (0)