♻️ Usermeta, is indexable, thumbnail and more fields on attachments

This commit is contained in:
2024-12-26 21:53:09 +08:00
parent 5bbf13b01e
commit 3a77af23cb
5 changed files with 35 additions and 20 deletions

View File

@@ -2,6 +2,7 @@ package api
import (
"fmt"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
@@ -45,8 +46,7 @@ func createAttachmentDirectly(c *fiber.Ctx) error {
metadata, err := services.NewAttachmentMetadata(tx, user, file, models.Attachment{
Alternative: c.FormValue("alt"),
MimeType: c.FormValue("mimetype"),
Metadata: usermeta,
IsMature: len(c.FormValue("mature")) > 0,
Usermeta: usermeta,
IsAnalyzed: false,
IsUploaded: true,
Destination: models.AttachmentDstTemporary,