All checks were successful
Docker / build-and-push (push) Successful in 3m33s
Client-side libsodium encryption with the key in the URL fragment, an Express/SQLite server holding ciphertext until a confirm-token round trip proves successful decrypt (avoiding the delete-on-first-byte race), TTL sweep for unclaimed drops, and a password-gated upload UI styled to match flit. Dockerized to match the project family's conventions, with a named volume so the DB/blobs survive redeploys, and a Gitea Actions workflow to build and push the image.
16 lines
599 B
TypeScript
16 lines
599 B
TypeScript
import path from 'node:path'
|
|
|
|
if (!process.env.UPLOAD_PASSWORD) {
|
|
console.error('UPLOAD_PASSWORD is not set — refusing to start with an open upload gate.')
|
|
process.exit(1)
|
|
}
|
|
|
|
export const config = {
|
|
port: Number(process.env.PORT ?? 3000),
|
|
dataDir: process.env.DATA_DIR ?? path.resolve('data'),
|
|
ttlSeconds: Number(process.env.TTL_SECONDS ?? 60 * 60 * 24 * 3), // 3 days
|
|
maxUploadBytes: Number(process.env.MAX_UPLOAD_BYTES ?? 200 * 1024 * 1024), // 200MB
|
|
uploadPassword: process.env.UPLOAD_PASSWORD,
|
|
cleanupIntervalSeconds: Number(process.env.CLEANUP_INTERVAL_SECONDS ?? 60 * 15),
|
|
}
|