X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Fcontrollers%2Flazy-static.ts;h=847d24fd479b3d9ecbb12bdf81cb3ce83b669b22;hb=a8b1b40485145ac1eae513a661d7dd6e0986ce96;hp=5c6369c9e5ed1a879d6f95fb75c7b7aa6564a04d;hpb=0472d474fdadd05211fb4f90ce275801db515d08;p=github%2FChocobozzz%2FPeerTube.git 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( ) lazyStaticRouter.use( - LAZY_STATIC_PATHS.PREVIEWS + ':uuid.jpg', + LAZY_STATIC_PATHS.PREVIEWS + ':filename', asyncMiddleware(getPreview) ) @@ -71,7 +71,7 @@ async function getAvatar (req: express.Request, res: express.Response) { } async function getPreview (req: express.Request, res: express.Response) { - const result = await VideosPreviewCache.Instance.getFilePath(req.params.uuid) + const result = await VideosPreviewCache.Instance.getFilePath(req.params.filename) if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER })