将上传目录访问路径和存储路径分开成两个配置

This commit is contained in:
aaronwmy
2022-05-29 12:21:24 +08:00
parent 72e11a7d31
commit 6026ac31b1
3 changed files with 10 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ func Routers() *gin.Engine {
// Router.Static("/static", "./dist/assets") // dist里面的静态资源
// Router.StaticFile("/", "./dist/index.html") // 前端网页入口页面
Router.StaticFS(global.GVA_CONFIG.Local.Path, http.Dir(global.GVA_CONFIG.Local.Path)) // 为用户头像和文件提供静态地址
Router.StaticFS(global.GVA_CONFIG.Local.Path, http.Dir(global.GVA_CONFIG.Local.StorePath)) // 为用户头像和文件提供静态地址
// Router.Use(middleware.LoadTls()) // 如果需要使用https 请打开此中间件 然后前往 core/server.go 将启动模式 更变为 Router.RunTLS("端口","你的cre/pem文件","你的key文件")
global.GVA_LOG.Info("use middleware logger")
// 跨域,如需跨域可以打开下面的注释
@@ -71,7 +71,7 @@ func Routers() *gin.Engine {
exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
// Code generated by github.com/flipped-aurora/gin-vue-admin/server Begin; DO NOT EDIT.
// Code generated by github.com/flipped-aurora/gin-vue-admin/server End; DO NOT EDIT.
}