Merge pull request #1708 from fuyouyshengwu/master

Solve the Chinese name disorder of download file
This commit is contained in:
Chris Lu 2020-12-27 19:37:11 -08:00 committed by GitHub
commit 2ffc87b86e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ import (
"io"
"mime"
"net/http"
"net/url"
"path/filepath"
"strconv"
"strings"
@ -121,6 +122,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
setEtag(w, etag)
filename := entry.Name()
filename = url.QueryEscape(filename)
adjustHeaderContentDisposition(w, r, filename)
totalSize := int64(entry.Size())