fix: persist upload original filename

This commit is contained in:
richjohnrambo
2026-09-30 14:25:44 +08:00
parent 097b028a19
commit 7685fb0c02
4 changed files with 20 additions and 16 deletions
+2 -3
View File
@@ -1502,9 +1502,8 @@ type FileDef struct {
User string
// Type of the file.
MimeType string
// OriginalName is the client-provided file name. It is not persisted; media handlers use it
// only to keep the public URL extension consistent with the uploaded file.
OriginalName string `db:"-" bson:"-" json:"-"`
// OriginalName is the client-provided file name.
OriginalName string `db:"original_name" bson:"original_name" json:"-"`
// Size of the file in bytes.
Size int64
// Internal file location, i.e. path on disk or an S3 blob address.