Update api/src/config/index.ts

This commit is contained in:
Med Marrouchi 2024-12-20 18:13:03 +01:00 committed by GitHub
parent 5172b970c5
commit 5567e9b750
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ export const config: Config = {
(process.env.UPLOAD_DIR && join(process.cwd(), process.env.UPLOAD_DIR)) ??
join(process.cwd(), 'uploads'),
avatarDir:
(process.env.AVATAR_DIR && join(process.cwd(), process.env.AVATAR_DIR)) ??
(process.env.AVATAR_DIR ? join(process.cwd(), process.env.AVATAR_DIR)) :
join(process.cwd(), 'avatars'),
storageMode: 'disk',
maxUploadSize: process.env.UPLOAD_MAX_SIZE_IN_BYTES