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.

17 lines
594 B

  1. package router
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "main/controller/api"
  5. "main/middleware"
  6. )
  7. func InitFileUploadAndDownloadRouter(Router *gin.RouterGroup) {
  8. FileUploadAndDownloadGroup := Router.Group("fileUploadAndDownload").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
  9. //.Use(middleware.JWTAuth())
  10. {
  11. FileUploadAndDownloadGroup.POST("/upload", api.UploadFile) // 上传文件
  12. FileUploadAndDownloadGroup.POST("/getFileList", api.GetFileList) // 获取上传文件列表
  13. FileUploadAndDownloadGroup.POST("/deleteFile", api.DeleteFile) // 删除指定文件
  14. }
  15. }