From e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 26 Jan 2021 10:23:21 +0100 Subject: Allow webp image uploads --- server/controllers/api/users/me.ts | 6 +++--- server/controllers/api/video-channel.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index c4e8d8130..5a3e9e51a 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts @@ -11,7 +11,7 @@ import { CONFIG } from '../../../initializers/config' import { MIMETYPES } from '../../../initializers/constants' import { sequelizeTypescript } from '../../../initializers/database' import { sendUpdateActor } from '../../../lib/activitypub/send' -import { deleteActorAvatarFile, updateActorAvatarFile } from '../../../lib/avatar' +import { deleteLocalActorAvatarFile, updateLocalActorAvatarFile } from '../../../lib/avatar' import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user' import { asyncMiddleware, @@ -238,7 +238,7 @@ async function updateMyAvatar (req: express.Request, res: express.Response) { const userAccount = await AccountModel.load(user.Account.id) - const avatar = await updateActorAvatarFile(userAccount, avatarPhysicalFile) + const avatar = await updateLocalActorAvatarFile(userAccount, avatarPhysicalFile) return res.json({ avatar: avatar.toFormattedJSON() }) } @@ -247,7 +247,7 @@ async function deleteMyAvatar (req: express.Request, res: express.Response) { const user = res.locals.oauth.token.user const userAccount = await AccountModel.load(user.Account.id) - await deleteActorAvatarFile(userAccount) + await deleteLocalActorAvatarFile(userAccount) return res.sendStatus(HttpStatusCode.NO_CONTENT_204) } diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 7ac01b0ef..14bd64730 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts @@ -13,7 +13,7 @@ import { MIMETYPES } from '../../initializers/constants' import { sequelizeTypescript } from '../../initializers/database' import { setAsyncActorKeys } from '../../lib/activitypub/actor' import { sendUpdateActor } from '../../lib/activitypub/send' -import { deleteActorAvatarFile, updateActorAvatarFile } from '../../lib/avatar' +import { deleteLocalActorAvatarFile, updateLocalActorAvatarFile } from '../../lib/avatar' import { JobQueue } from '../../lib/job-queue' import { createLocalVideoChannel, federateAllVideosOfChannel } from '../../lib/video-channel' import { @@ -140,7 +140,7 @@ async function updateVideoChannelAvatar (req: express.Request, res: express.Resp const videoChannel = res.locals.videoChannel const oldVideoChannelAuditKeys = new VideoChannelAuditView(videoChannel.toFormattedJSON()) - const avatar = await updateActorAvatarFile(videoChannel, avatarPhysicalFile) + const avatar = await updateLocalActorAvatarFile(videoChannel, avatarPhysicalFile) auditLogger.update(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannel.toFormattedJSON()), oldVideoChannelAuditKeys) @@ -154,7 +154,7 @@ async function updateVideoChannelAvatar (req: express.Request, res: express.Resp async function deleteVideoChannelAvatar (req: express.Request, res: express.Response) { const videoChannel = res.locals.videoChannel - await deleteActorAvatarFile(videoChannel) + await deleteLocalActorAvatarFile(videoChannel) return res.sendStatus(HttpStatusCode.NO_CONTENT_204) } -- cgit v1.2.3