Fix local file system storage provider path error

This commit is contained in:
Yang Luo
2023-04-21 10:12:09 +08:00
parent 19209718ea
commit e78d9e5d2b

View File

@ -51,6 +51,12 @@ func StaticFilter(ctx *context.Context) {
path += urlPath path += urlPath
} }
path2 := strings.TrimLeft(path, "web/build/images/")
if util.FileExist(path2) {
http.ServeFile(ctx.ResponseWriter, ctx.Request, path2)
return
}
if !util.FileExist(path) { if !util.FileExist(path) {
path = "web/build/index.html" path = "web/build/index.html"
} }