Binding form file using a struct #2446
confusionhill
started this conversation in
General
Replies: 1 comment
-
You can try this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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