fix: persist subscriber avatars

This commit is contained in:
yassinedorbozgithub 2024-12-20 17:20:13 +01:00
parent 5d5dbda90c
commit 40043ee293
2 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,9 @@ export const config: Config = {
uploadDir:
(process.env.UPLOAD_DIR && join(process.cwd(), process.env.UPLOAD_DIR)) ??
join(process.cwd(), 'uploads'),
avatarDir: process.env.AVATAR_DIR ?? join(process.cwd(), 'avatars'),
avatarDir:
(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
? Number(process.env.UPLOAD_MAX_SIZE_IN_BYTES)

View File

@ -15,6 +15,7 @@ HTTPS_ENABLED=false
SESSION_SECRET=f661ff500fff6b0c8f91310b6fff6b0c
SESSION_NAME=s.id
UPLOAD_DIR=/uploads
AVATAR_DIR=/uploads/avatars
UPLOAD_MAX_SIZE_IN_BYTES=2000000
INVITATION_JWT_SECRET=dev_only
INVITATION_EXPIRES_IN=24h