🐛 Fix metadata missing author info

This commit is contained in:
2024-08-02 21:38:47 +08:00
parent 03f08f1ff6
commit a696b13837
4 changed files with 8 additions and 14 deletions

View File

@ -48,7 +48,7 @@ func GetAttachmentByHash(hash string) (models.Attachment, error) {
return attachment, nil
}
func NewAttachmentMetadata(tx *gorm.DB, user *models.Account, file *multipart.FileHeader, attachment models.Attachment) (models.Attachment, error) {
func NewAttachmentMetadata(tx *gorm.DB, user models.Account, file *multipart.FileHeader, attachment models.Attachment) (models.Attachment, error) {
attachment.Uuid = uuid.NewString()
attachment.Size = file.Size
attachment.Name = file.Filename