Binding form file using a struct #2446
confusionhill
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, i got this requirement where the payload look like this
{
userID
file_type
file
}
I tried to do something like this
type UploadDocumentRequestDTO struct { UserID 'form:"uid"' File *multipart.FileHeader 'form:"file" validate:"required"' Msg string 'file:"msg" validate:"required"' }
doesn't seems to work.
Is it possible to do something like that?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions