Compare commits
2 Commits
5e77fdd33b
...
0de18e89fc
Author | SHA1 | Date |
---|---|---|
Niko Abeler | 0de18e89fc | |
Niko Abeler | 40117dab37 |
|
@ -23,9 +23,9 @@ func (h *MediaHandler) Handle(c *fiber.Ctx) error {
|
|||
return err
|
||||
}
|
||||
binary, err := h.binaryService.FindById(id)
|
||||
c.Set("Content-Type", binary.Mime())
|
||||
if err != nil {
|
||||
return err
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
c.Set("Content-Type", binary.Mime())
|
||||
return c.Send(binary.Data)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue