Skip to content

Commit

Permalink
Fix reflection error (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
angary authored Sep 10, 2023
1 parent 13c3591 commit b26e913
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/endpoints/form_parsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ func parseFormFiles(r *http.Request, target interface{}) error {

if field.Type() == formFileType {
// Parse the incoming form file
uploadedFile, _, err := r.FormFile(field.Type().Name())
fileName := v.Type().Field(i).Name
uploadedFile, _, err := r.FormFile(fileName)
if err != nil {
return err
}
Expand Down

0 comments on commit b26e913

Please sign in to comment.