Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
feature: Support the upload of multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Haas committed Dec 4, 2023
1 parent 99bf8e8 commit ed440a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binding/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func App() *buffalo.App {
}
result := make([]string, len(wmf.MyFiles))
for i, f := range wmf.MyFiles {
result[i] += fmt.Sprintf("%s:%d", f.Filename, f.Size)
result[i] += fmt.Sprintf("%s", f.Filename)

}
return c.Render(http.StatusCreated, render.String(strings.Join(result, ",")))
Expand Down Expand Up @@ -92,7 +92,7 @@ func Test_File_Upload_On_Struct_WithTag_WithMultipleFiles(t *testing.T) {
App().ServeHTTP(res, req)

r.Equal(http.StatusCreated, res.Code)
r.Equal("file_test.go:3672,file.go:348,types.go:507", res.Body.String())
r.Equal("file_test.go,file.go,types.go", res.Body.String())
}

func Test_File_Upload_On_Struct_WithTag(t *testing.T) {
Expand Down

0 comments on commit ed440a3

Please sign in to comment.