Fix: able to upload empty file

This commit is contained in:
HFO4 committed 2019-11-23 15:37:13 +08:00
1 parent 948059ec1c
commit 671d031d00
6 files changed
+45 -4

No files matched your search

+8 -1
View File
@@ -50,7 +50,7 @@ func InitRouter() *gin.Engine {
auth := v3.Group("")
auth.Use(middleware.AuthRequired())
{
// 用户类
// 用户
user := auth.Group("User")
{
// 当前登录用户信息
@@ -64,6 +64,13 @@ func InitRouter() *gin.Engine {
file.POST("Upload", controllers.FileUploadStream)
}
// 目录
directory := auth.Group("Directory")
{
// 文件上传
directory.PUT("", controllers.Ping)
}
}
}