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
|
return err
|
||||||
}
|
}
|
||||||
binary, err := h.binaryService.FindById(id)
|
binary, err := h.binaryService.FindById(id)
|
||||||
c.Set("Content-Type", binary.Mime())
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
c.Set("Content-Type", binary.Mime())
|
||||||
return c.Send(binary.Data)
|
return c.Send(binary.Data)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue