diff options
Diffstat (limited to 'server/controllers/lazy-static.ts')
-rw-r--r-- | server/controllers/lazy-static.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts index 5c6369c9e..847d24fd4 100644 --- a/server/controllers/lazy-static.ts +++ b/server/controllers/lazy-static.ts | |||
@@ -18,7 +18,7 @@ lazyStaticRouter.use( | |||
18 | ) | 18 | ) |
19 | 19 | ||
20 | lazyStaticRouter.use( | 20 | lazyStaticRouter.use( |
21 | LAZY_STATIC_PATHS.PREVIEWS + ':uuid.jpg', | 21 | LAZY_STATIC_PATHS.PREVIEWS + ':filename', |
22 | asyncMiddleware(getPreview) | 22 | asyncMiddleware(getPreview) |
23 | ) | 23 | ) |
24 | 24 | ||
@@ -71,7 +71,7 @@ async function getAvatar (req: express.Request, res: express.Response) { | |||
71 | } | 71 | } |
72 | 72 | ||
73 | async function getPreview (req: express.Request, res: express.Response) { | 73 | async function getPreview (req: express.Request, res: express.Response) { |
74 | const result = await VideosPreviewCache.Instance.getFilePath(req.params.uuid) | 74 | const result = await VideosPreviewCache.Instance.getFilePath(req.params.filename) |
75 | if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) | 75 | if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) |
76 | 76 | ||
77 | return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER }) | 77 | return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER }) |