Configuration
Defaults live in lib/appConfig.ts. Overrides persist in Redis via Settings / PUT /api/config.
| Field | Default | Role |
|---|---|---|
folderName | uploads | OneDrive destination folder under drive root |
bufferTimeMs | 60000 (1 min) | Delay before a new link becomes usable |
linkExpiryTimeMs | 3600000 (1 h) | Link lifetime / Redis TTL at create |
fileDetails.maxFileCount | 1 | One video per upload |
fileDetails.maxFileSizeBytes | 4 GB | Hard max |
fileDetails.maxSimpleFileSizeBytes | 4 MB | Threshold for simple vs session upload |
fileDetails.uploadChunkSizeBytes | 10 MB | Resumable chunk size |
referenceSheetName | REFERENCE.xlsx | Workbook for child picker |
childNameColumn / edcColumn | Child Name / EDC | Excel headers (or letters) |
allowedAdminEmails | defaults + env | Who may use /setup and own the drive |
Accepted upload types default to video/* (client also accepts empty MIME + common video extensions for iOS).
Extending safely
| Change | Suggested approach |
|---|---|
| New setting | Add to AppConfig + defaults + Settings UI + updateAppConfig merge |
| New API | Place under app/api/…/route.ts; call access helpers explicitly |
| Filename scheme | Adjust lib/uploadFilename.ts; keep age logic in lib/age.ts |
| Extra notification channel | Hook beside sendUploadNotificationEmail in /api/upload/complete |
| UI copy | Prefer app/page.tsx / setup page; keep legal copy via lib/publisher.ts |
Last updated on