Update README.md (#2997)

This commit is contained in:
linzi 2021-12-23 07:51:12 +08:00 committed by GitHub
parent 8a0f95cc71
commit 1538ece13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -384,7 +384,7 @@ func main() {
// Set a lower memory limit for multipart forms (default is 32 MiB)
router.MaxMultipartMemory = 8 << 20 // 8 MiB
router.POST("/upload", func(c *gin.Context) {
// single file
// Single file
file, _ := c.FormFile("Filename")
log.Println(file.Filename)
@ -417,7 +417,7 @@ func main() {
router.POST("/upload", func(c *gin.Context) {
// Multipart form
form, _ := c.MultipartForm()
files := form.File["upload[]"]
files := form.File["Filename[]"]
for _, file := range files {
log.Println(file.Filename)