mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 02:32:17 +08:00
fix(example): add missing return
This commit is contained in:
parent
384a897a8f
commit
8a47549986
@ -25,6 +25,7 @@ func main() {
|
||||
for _, file := range files {
|
||||
if err := c.SaveUploadedFile(file, file.Filename); err != nil {
|
||||
c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ func main() {
|
||||
|
||||
if err := c.SaveUploadedFile(file, file.Filename); err != nil {
|
||||
c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.String(http.StatusOK, fmt.Sprintf("File %s uploaded successfully with fields name=%s and email=%s.", file.Filename, name, email))
|
||||
|
Loading…
x
Reference in New Issue
Block a user