mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
Merge pull request #583 from Hexastack/feat/storage-mode-env-var
feat: make storage mode configurable env var
This commit is contained in:
commit
bb2d0d4499
@ -111,7 +111,7 @@ export const config: Config = {
|
||||
process.env.UPLOAD_DIR || '/uploads',
|
||||
'/avatars',
|
||||
),
|
||||
storageMode: 'disk',
|
||||
storageMode: (process.env.STORAGE_MODE as 'disk' | 'memory') || 'disk',
|
||||
maxUploadSize: process.env.UPLOAD_MAX_SIZE_IN_BYTES
|
||||
? Number(process.env.UPLOAD_MAX_SIZE_IN_BYTES)
|
||||
: 50 * 1024 * 1024, // 50 MB in bytes
|
||||
|
@ -17,7 +17,9 @@ HTTPS_ENABLED=false
|
||||
SESSION_SECRET=f661ff500fff6b0c8f91310b6fff6b0c
|
||||
SESSION_NAME=s.id
|
||||
# Relative attachments upload directory path to the app folder
|
||||
UPLOAD_DIR=/uploads
|
||||
UPLOAD_DIR=/uploads
|
||||
# STORAGE MODE
|
||||
STORAGE_MODE=disk
|
||||
# Max attachments upload size in bytes
|
||||
UPLOAD_MAX_SIZE_IN_BYTES=20971520
|
||||
INVITATION_JWT_SECRET=dev_only
|
||||
|
Loading…
Reference in New Issue
Block a user