diff --git a/src/server/decorators/dbFile.ts b/src/server/decorators/dbFile.ts index b37d3fc04..d7fd2f91e 100644 --- a/src/server/decorators/dbFile.ts +++ b/src/server/decorators/dbFile.ts @@ -21,7 +21,7 @@ function dbFileDecorator(fastify: FastifyInstance, _, done) { this.header('Content-Length', size); this.header('Content-Type', download ? 'application/octet-stream' : file.mimetype); this.header('Content-Disposition', `inline; filename="${encodeURI(file.originalName || file.name)}"`); - if (file.mimetype.startsWith('video/')) { + if (file.mimetype.startsWith('video/') || file.mimetype.startsWith('audio/')) { this.header('Accept-Ranges', 'bytes'); // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range this.header('Content-Range', `bytes 0-${size - 1}/${size}`);