diff --git a/models/UploadChunck.go b/models/UploadChunck.go index fe9f1f4..23c0d8c 100755 --- a/models/UploadChunck.go +++ b/models/UploadChunck.go @@ -9,6 +9,6 @@ type UploadChunck struct { } type UploadChunckValidation struct { - Index *uint `validate:"required,min=0,max=10000"` - SessionJwtToken string `validate:"required,jwt"` + Index *uint `validate:"required,min=0,max=10000" json:"Index" form:"Index"` + SessionJwtToken string `validate:"required,jwt" json:"SessionJwtToken" form:"SessionJwtToken"` } diff --git a/models/UploadFile.go b/models/UploadFile.go index d061091..4b25985 100755 --- a/models/UploadFile.go +++ b/models/UploadFile.go @@ -1,5 +1,5 @@ package models type UploadFileValidation struct { - SessionJwtToken string `validate:"required,min=1"` + SessionJwtToken string `validate:"required,min=1" json:"SessionJwtToken" form:"SessionJwtToken"` } diff --git a/models/UploadSession.go b/models/UploadSession.go index c20400c..ff63ddb 100755 --- a/models/UploadSession.go +++ b/models/UploadSession.go @@ -24,11 +24,11 @@ type UploadSessionClaims struct { } type UploadSessionValidation struct { - Name string `validate:"required,min=1,max=128"` - Size int64 `validate:"required,number,min=1"` - ParentFolderID uint `validate:"number"` + Name string `validate:"required,min=1,max=128" json:"Name" form:"Name"` + Size int64 `validate:"required,number,min=1" json:"Size" form:"Size"` + ParentFolderID uint `validate:"number" json:"ParentFolderID" form:"ParentFolderID"` } type DeleteUploadSessionValidation struct { - UploadSessionUUID string `validate:"required,uuid_rfc4122"` + UploadSessionUUID string `validate:"required,uuid_rfc4122" json:"UploadSessionUUID" form:"UploadSessionUUID"` }