fix: null on non originalName

This commit is contained in:
diced 2023-03-04 17:47:40 -08:00
parent e2673fa9e1
commit 6583f1114c
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1

View file

@ -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);
}