fix crash on missing file
This commit is contained in:
parent
5e77fdd33b
commit
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
|
||||
}
|
||||
c.Set("Content-Type", binary.Mime())
|
||||
return c.Send(binary.Data)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue