0

c.SendFile Not Working Showing on postman that Directory index is forbidden

func GetFile(c *fiber.Ctx) error {
    url := c.Params("file")
    return c.SendFile(fmt.Sprintf("./files/%s", url))
}
func DownloadFile(c *fiber.Ctx) error {
    url := c.Params("file")
    return c.Download(fmt.Sprintf("./files/%s", url))
}

Akik jamil
  • 25
  • 1

0 Answers0