From a46fe3669633883f27b18b39728ff5f7d77b09b4 Mon Sep 17 00:00:00 2001 From: a7458969 <290198252@qq.com> Date: Tue, 28 Apr 2020 22:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=AE=A1=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/file.go | 7 +++++++ main.go | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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()))