Fix missing dquote

This commit is contained in:
Cameron Redmore 2025-02-15 12:53:22 +00:00
parent ef876b1fef
commit a2140625d4

View file

@ -112,7 +112,7 @@ fastify.get('/s/:date/:filename', async (request, reply) => {
<meta property="og:url" content="${process.env.HOST || ''}/s/${date}/${filename}" />\n`; <meta property="og:url" content="${process.env.HOST || ''}/s/${date}/${filename}" />\n`;
if (mimeType.startsWith('image/')) { if (mimeType.startsWith('image/')) {
fileContent = `<img src="/f/${joinedPath}" alt="${filename}" width="${width}" height="${height} />` fileContent = `<img src="/f/${joinedPath}" alt="${filename}" width="${width}" height="${height}" />`
ogTags += `<meta property="og:image" content="/f/${joinedPath}" /> ogTags += `<meta property="og:image" content="/f/${joinedPath}" />
<meta property="og:image:type" content="${mimeType}" /> <meta property="og:image:type" content="${mimeType}" />
<meta property="og:image:width" content="${width}" /> <meta property="og:image:width" content="${width}" />
@ -120,7 +120,7 @@ fastify.get('/s/:date/:filename', async (request, reply) => {
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
` `
} else if (mimeType.startsWith('video/')) { } else if (mimeType.startsWith('video/')) {
fileContent = `<video controls width="${width}" height="${height}><source src="/f/${joinedPath}" type="${mimeType}"></video>` fileContent = `<video controls width="${width}" height="${height}"><source src="/f/${joinedPath}" type="${mimeType}"></video>`
ogTags += `<meta property="og:video" content="/f/${joinedPath}" /> ogTags += `<meta property="og:video" content="/f/${joinedPath}" />
<meta property="og:video:type" content="${mimeType}" /> <meta property="og:video:type" content="${mimeType}" />
<meta property="og:video:width" content="${width}" /> <meta property="og:video:width" content="${width}" />