diff --git a/controller/file.go b/controller/file.go index 7e1ddf5..50aa510 100644 --- a/controller/file.go +++ b/controller/file.go @@ -78,6 +78,13 @@ func (this *FileController) FileList(c *gin.Context) { } +func (this *FileController) FileType(c *gin.Context) { + +} +func (this *FileController) DownloadFile(c *gin.Context) { + +} + func (this *FileController) OnUploadFile(c *gin.Context) { uid,e := uuid.NewV1() if nil != e{ diff --git a/main.go b/main.go index 0e76d9f..994a1c6 100644 --- a/main.go +++ b/main.go @@ -131,8 +131,11 @@ func main() { api.GET("/hardware",controller.ReadHardWare) // 读取硬件 api.DELETE("/hardware",controller.DeleteHardWare) // 读取硬件 - api.PUT("file",fileController.OnUploadFile) - api.GET("filelist",fileController.FileList) + api.PUT("file",fileController.OnUploadFile) // 上传文件 + api.GET("file",fileController.DownloadFile) // 下载 文件 + api.GET("filelist",fileController.FileList) // 文件列表 + api.GET("fileType",fileController.FileType) // 文件类型 + } e := r.Run(":" + strconv.Itoa(config.GetPort()))