feat: private certificates/documents buckets with SeaweedFS support

Add Document CRUD, temp→bucket commit flow, SeaweedFS env aliases, and default temp bucket name to temp.
This commit is contained in:
2026-08-15 02:53:59 +03:30
parent 5c2fad4b44
commit 4603b45208
18 changed files with 585 additions and 112 deletions
@@ -23,15 +23,37 @@ const certificateSchema = new mongoose.Schema({
type: String,
trim: true
},
/** Permanent object key inside the certificates bucket */
fileKey: {
type: String,
required: true,
trim: true
},
/** Original uploaded filename */
fileName: {
type: String,
trim: true
},
/** Legacy alias kept in sync with fileName */
originalName: {
type: String,
trim: true
},
/** Public URL only when the certificates bucket is public; otherwise null */
fileUrl: {
type: String,
trim: true,
default: null
},
bucket: {
type: String,
trim: true,
default: 'certificates'
},
mimeType: {
type: String,
trim: true
},
issuedAt: {
type: Date,
default: Date.now