fix: chi.URLParam中文未解码导致删除失败,加url.PathUnescape
This commit is contained in:
parent
210465cc71
commit
332e36bd8f
@ -3770,6 +3770,9 @@ func (u *UI) actionAssetVideoSourceDelete(w http.ResponseWriter, r *http.Request
|
||||
return
|
||||
}
|
||||
name := chi.URLParam(r, "name")
|
||||
if decoded, err := url.PathUnescape(name); err == nil {
|
||||
name = decoded
|
||||
}
|
||||
if err := u.preview.DeleteVideoSource(name); err != nil {
|
||||
http.Redirect(w, r, "/assets/video-sources?error="+urlQueryEscape(err.Error())+"&name="+url.PathEscape(name), http.StatusFound)
|
||||
return
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user