forked from electricdusk/rushlink
parent
a0c8383555
commit
b7ea5dfa4f
@ -198,6 +198,13 @@ func (rl *rushlink) viewCreateSuccess(w http.ResponseWriter, r *http.Request, p
|
||||
if fu != nil {
|
||||
fileExt = fu.Ext()
|
||||
}
|
||||
// Redirect to the new paste.
|
||||
pasteURL := url.URL{
|
||||
Path: fmt.Sprintf("/%s%s/meta", p.Key, fileExt),
|
||||
RawQuery: fmt.Sprintf("deleteToken=%s", url.QueryEscape(p.DeleteToken)),
|
||||
}
|
||||
http.Redirect(w, r, pasteURL.String(), http.StatusFound)
|
||||
// But still render the page for CURL-like clients.
|
||||
data := map[string]interface{}{
|
||||
"Paste": p,
|
||||
"FileExt": fileExt,
|
||||
|
Loading…
Reference in New Issue
Block a user