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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user