未验证 提交 1538ece1 编写于 作者: L linzi 提交者: GitHub

Update README.md (#2997)

上级 8a0f95cc
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册