X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Flazy-static.ts;h=25d3b49b4655d2ebf788b37c9bc2dc2872635ccc;hb=2b02c520e66ea452687cab39401b371711caa9ed;hp=68b5c9eec2badabc911d7caf29f68297ec3c3ac4;hpb=f479685678406a5df864d89615b33d29085ebfc6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts index 68b5c9eec..25d3b49b4 100644 --- a/server/controllers/lazy-static.ts +++ b/server/controllers/lazy-static.ts @@ -7,7 +7,7 @@ import { LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants' import { actorImagePathUnsafeCache, pushActorImageProcessInQueue } from '../lib/actor-image' import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache' import { asyncMiddleware } from '../middlewares' -import { ActorImageModel } from '../models/account/actor-image' +import { ActorImageModel } from '../models/actor/actor-image' const lazyStaticRouter = express.Router() @@ -64,7 +64,7 @@ async function getActorImage (req: express.Request, res: express.Response) { logger.info('Lazy serve remote actor image %s.', image.fileUrl) try { - await pushActorImageProcessInQueue({ filename: image.filename, fileUrl: image.fileUrl }) + await pushActorImageProcessInQueue({ filename: image.filename, fileUrl: image.fileUrl, type: image.type }) } catch (err) { logger.warn('Cannot process remote actor image %s.', image.fileUrl, { err }) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)