fix multi-select files download error when filename contains '+'

This commit is contained in:
Chris 2018-11-21 17:40:11 +08:00 committed by 1138-4EB
parent 802bcd8cbd
commit 1931b40a55

View File

@ -30,7 +30,7 @@ func downloadHandler(c *fb.Context, w http.ResponseWriter, r *http.Request) (int
if len(names) != 0 { if len(names) != 0 {
for _, name := range names { for _, name := range names {
// Unescape the name. // Unescape the name.
name, err := url.QueryUnescape(name) name, err := url.QueryUnescape(strings.Replace(name, "+", "%2B", -1))
if err != nil { if err != nil {
return http.StatusInternalServerError, err return http.StatusInternalServerError, err
} }