Files
temp-file-trans/config.py
2026-04-30 18:40:49 +08:00

17 lines
496 B
Python

import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SECRET_KEY = os.environ.get('SECRET_KEY', 'dev-secret-key-change-in-production')
UPLOAD_FOLDER = os.path.join(BASE_DIR, 'uploads')
DATABASE = os.path.join(BASE_DIR, 'files.db')
# Max request body size for uploads: 200 MB
# This enforces the maximum file size that can be uploaded via the service.
MAX_CONTENT_LENGTH = 200 * 1024 * 1024
EXPIRY_OPTIONS = {
'1h': 60 * 60,
'24h': 24 * 60 * 60,
'7d': 7 * 24 * 60 * 60,
}