You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/internal/servants/localoss/localoss.go

25 lines
521 B

package localoss
import (
"path/filepath"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/sirupsen/logrus"
)
type localossSrv struct {
// TODO
}
// RouteLocalOSS register LocalOSS route if needed
func RouteLocalOSS(e *gin.Engine) {
savePath, err := filepath.Abs(conf.LocalOSSSetting.SavePath)
if err != nil {
logrus.Fatalf("get localOSS save path err: %v", err)
}
e.Static("/oss", savePath)
logrus.Infof("register LocalOSS route in /oss on save path: %s", savePath)
}