save name as desc if absent
This commit is contained in:
parent
ead0b2995e
commit
ef2d89d7c9
3
honk.go
3
honk.go
|
@ -1275,6 +1275,9 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
|
||||||
xid += ".txt"
|
xid += ".txt"
|
||||||
}
|
}
|
||||||
desc := r.FormValue("donkdesc")
|
desc := r.FormValue("donkdesc")
|
||||||
|
if desc == "" {
|
||||||
|
desc = name
|
||||||
|
}
|
||||||
url := fmt.Sprintf("https://%s/d/%s", serverName, xid)
|
url := fmt.Sprintf("https://%s/d/%s", serverName, xid)
|
||||||
res, err := stmtSaveFile.Exec(xid, name, desc, url, media, 1, data)
|
res, err := stmtSaveFile.Exec(xid, name, desc, url, media, 1, data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue