Preserve uploaded file extensions

This commit is contained in:
richjohnrambo
2026-09-07 16:13:20 +08:00
parent 35da3025a3
commit 8a9e202b56
8 changed files with 139 additions and 14 deletions
+3
View File
@@ -1479,6 +1479,9 @@ 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:"-"`
// Size of the file in bytes.
Size int64
// Internal file location, i.e. path on disk or an S3 blob address.