Easily serve your shareable public directory
go get github.com/supanadit/media
package main
import (
"github.com/gin-gonic/gin"
"github.com/supanadit/media"
)
func main() {
// Create instance of Gin Engine
g := gin.Default()
// Serve and create shared directory
_ = media.Gin(g).SetDestination("./upload").Create()
// Serve gin at port :8080
_ = g.Run(":8080")
}
Sorry, currently its only support Gin web framework, but soon it will support Echo as well