mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
@@ -24,6 +24,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -424,7 +425,7 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
w.Header().Set("Cache-Control", "max-age=2592000, public")
|
||||
w.Header().Set("Content-Length", strconv.Itoa(len(f)))
|
||||
w.Header().Set("Content-Type", "") // need to provide proper Content-Type in the future
|
||||
w.Header().Set("Content-Type", mime.TypeByExtension(filepath.Ext(filename)))
|
||||
w.Write(f)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user