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.

23 lines
1.4 KiB

3 years ago
  1. package example
  2. import (
  3. "gin-vue-admin/api/v1"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type FileUploadAndDownloadRouter struct {
  7. }
  8. func (e *FileUploadAndDownloadRouter) InitFileUploadAndDownloadRouter(Router *gin.RouterGroup) {
  9. fileUploadAndDownloadRouter := Router.Group("fileUploadAndDownload")
  10. var exaFileUploadAndDownloadApi = v1.ApiGroupApp.ExampleApiGroup.FileUploadAndDownloadApi
  11. {
  12. fileUploadAndDownloadRouter.POST("/upload", exaFileUploadAndDownloadApi.UploadFile) // 上传文件
  13. fileUploadAndDownloadRouter.POST("/getFileList", exaFileUploadAndDownloadApi.GetFileList) // 获取上传文件列表
  14. fileUploadAndDownloadRouter.POST("/deleteFile", exaFileUploadAndDownloadApi.DeleteFile) // 删除指定文件
  15. fileUploadAndDownloadRouter.POST("/breakpointContinue", exaFileUploadAndDownloadApi.BreakpointContinue) // 断点续传
  16. fileUploadAndDownloadRouter.GET("/findFile", exaFileUploadAndDownloadApi.FindFile) // 查询当前文件成功的切片
  17. fileUploadAndDownloadRouter.POST("/breakpointContinueFinish", exaFileUploadAndDownloadApi.BreakpointContinueFinish) // 查询当前文件成功的切片
  18. fileUploadAndDownloadRouter.POST("/removeChunk", exaFileUploadAndDownloadApi.RemoveChunk) // 查询当前文件成功的切片
  19. }
  20. }