I have saved some of videos in specific paths. I want the video to be displayed when the API is called. I do this using c.SendFile()
. The problem is that by calling the API once by vlc or browser, it is called several times. I realized this from fmt.Println("called")
.
What is the problem?
func main() {
app := fiber.New()
app.Get("/video", func(c *fiber.Ctx) error {
fmt.Println("called")
return c.SendFile("./videos/2022/12/17/1a191775-a3ab-427a-932e-ebbb3d2879b1/video-360.mp4");
})
app.Listen(":3030")
}