feat(quark): shard request file (close #4175)

This commit is contained in:
Andy Hsu
2023-04-17 15:31:39 +08:00
parent 7f35aab071
commit 8711f2a1c5
5 changed files with 68 additions and 14 deletions

View File

@ -72,6 +72,8 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"; filename*=UTF-8''%s`, filename, url.PathEscape(filename)))
http.ServeContent(w, r, file.GetName(), fileStat.ModTime(), f)
return nil
} else if link.Handle != nil {
return link.Handle(w, r)
} else {
req, err := http.NewRequest(r.Method, link.URL, nil)
if err != nil {