diff options
author | Antoni Sawicki <tenox@google.com> | 2022-06-20 01:21:27 -0700 |
---|---|---|
committer | Antoni Sawicki <tenox@google.com> | 2022-06-20 01:21:27 -0700 |
commit | 6c5d047896e1ab88b041ac4b94e13dc9fed463d9 (patch) | |
tree | cd573fff324df8dd557ab741a46c39c6a0f2aa2c | |
parent | 6db3ca4ed535e011a79ca847d2f88d95beacf06c (diff) | |
download | wfm-6c5d047896e1ab88b041ac4b94e13dc9fed463d9.tar.gz |
disp inline provide filename hint
-rw-r--r-- | fileio.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -72,7 +72,7 @@ func dispInline(w http.ResponseWriter, uFilePath string) { fi.Close() w.Header().Set("Content-Type", mt.String()) - w.Header().Set("Content-Disposition", "inline") + w.Header().Set("Content-Disposition", "inline; filename=\""+url.QueryEscape(filepath.Base(uFilePath))+"\";") w.Header().Set("Content-Length", fmt.Sprint(f.Size())) w.Header().Set("Cache-Control", *cacheCtl) streamFile(w, uFilePath) |