diff --git a/src/server/decorators/dbFile.ts b/src/server/decorators/dbFile.ts index 32a3fbd..a5e124f 100644 --- a/src/server/decorators/dbFile.ts +++ b/src/server/decorators/dbFile.ts @@ -18,7 +18,7 @@ function dbFileDecorator(fastify: FastifyInstance, _, done) { this.header('Content-Length', size); this.header('Content-Type', file.mimetype); - this.header('Content-Disposition', `inline; filename="${file.originalName}"`); + this.header('Content-Disposition', `inline; filename="${file.originalName || file.name}"`); return this.send(data); }