Enhance comment functionality with image support and validation.

This commit is contained in:
2025-06-24 12:00:48 +08:00
parent b818777a45
commit 953b1cf86a
12 changed files with 469 additions and 88 deletions

View File

@@ -19,7 +19,8 @@ func handleUploadImage(c fiber.Ctx) error {
if !strings.HasPrefix(contentType, "image/") {
return model.NewRequestError("Invalid image format")
}
id, err := service.CreateImage(uid, data)
ip := c.IP()
id, err := service.CreateImage(uid, ip, data)
if err != nil {
return err
}