Skip to content

Commit d56ff47

Browse files
committed
fix switch if no commandline field in POST
1 parent 34455ab commit d56ff47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

conn.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ func uploadHandler(c *gin.Context) {
5757
extraInfo.authdata.UserName = c.PostForm("auth_user")
5858
extraInfo.authdata.Password = c.PostForm("auth_pass")
5959
commandline := c.PostForm("commandline")
60+
if commandline == "undefined" {
61+
commandline = ""
62+
}
6063
extraInfo.use_1200bps_touch, _ = strconv.ParseBool(c.PostForm("use_1200bps_touch"))
6164
extraInfo.wait_for_upload_port, _ = strconv.ParseBool(c.PostForm("wait_for_upload_port"))
6265
extraInfo.networkPort, _ = strconv.ParseBool(c.PostForm("network"))

0 commit comments

Comments
 (0)