Skip to content

Commit

Permalink
doc: change the form name of upload example code (#3076)
Browse files Browse the repository at this point in the history
  • Loading branch information
phith0n committed Mar 15, 2022
1 parent 5f0b6cd commit ecadd82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -385,7 +385,7 @@ func main() {
router.MaxMultipartMemory = 8 << 20 // 8 MiB
router.POST("/upload", func(c *gin.Context) {
// Single file
file, _ := c.FormFile("Filename")
file, _ := c.FormFile("file")
log.Println(file.Filename)

// Upload the file to specific dst.
Expand Down Expand Up @@ -417,7 +417,7 @@ func main() {
router.POST("/upload", func(c *gin.Context) {
// Multipart form
form, _ := c.MultipartForm()
files := form.File["Filename[]"]
files := form.File["upload[]"]

for _, file := range files {
log.Println(file.Filename)
Expand Down

0 comments on commit ecadd82

Please sign in to comment.