Fix: able to upload empty file

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

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)
}
}
}