添加文件上传管理接口

master
a7458969 2020-04-28 22:57:52 +08:00
parent 1867f78730
commit a46fe36696
2 changed files with 12 additions and 2 deletions

View File

@ -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) { func (this *FileController) OnUploadFile(c *gin.Context) {
uid,e := uuid.NewV1() uid,e := uuid.NewV1()
if nil != e{ if nil != e{

View File

@ -131,8 +131,11 @@ func main() {
api.GET("/hardware",controller.ReadHardWare) // 读取硬件 api.GET("/hardware",controller.ReadHardWare) // 读取硬件
api.DELETE("/hardware",controller.DeleteHardWare) // 读取硬件 api.DELETE("/hardware",controller.DeleteHardWare) // 读取硬件
api.PUT("file",fileController.OnUploadFile) api.PUT("file",fileController.OnUploadFile) // 上传文件
api.GET("filelist",fileController.FileList) api.GET("file",fileController.DownloadFile) // 下载 文件
api.GET("filelist",fileController.FileList) // 文件列表
api.GET("fileType",fileController.FileType) // 文件类型
} }
e := r.Run(":" + strconv.Itoa(config.GetPort())) e := r.Run(":" + strconv.Itoa(config.GetPort()))