Skip to content
Myr

doc: change the form name of upload example code (#3076)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by phithon · committed by GitHub · parent 5f0b6cd · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:README.md+2 added-2 removed
383 unmodified lines
384 // Set a lower memory limit for multipart forms (default is 32 MiB)385 router.MaxMultipartMemory = 8 << 20 // 8 MiB386 router.POST("/upload", func(c *gin.Context) {387 // Single file388 file, _ := c.FormFile("Filename")388 file, _ := c.FormFile("file")389 log.Println(file.Filename)390391 // Upload the file to specific dst.392 c.SaveUploadedFile(file, dst)
23 unmodified lines
416 router.MaxMultipartMemory = 8 << 20 // 8 MiB417 router.POST("/upload", func(c *gin.Context) {418 // Multipart form419 form, _ := c.MultipartForm()420 files := form.File["Filename[]"]420 files := form.File["upload[]"]421422 for _, file := range files {423 log.Println(file.Filename)424
1901 unmodified lines