Commit 74c92237 authored by Vasily Naumkin's avatar Vasily Naumkin Committed by Christopher Speller
Browse files

Do not force downloading of shared public files (#9412)

I believe we don't need to force downloading of shared public files, because `writeFileResponse` method will compare its MIME type with `MEDIA_CONTENT_TYPES` and output it inline or as attachment automatically.

Usually we are share images and it is much more convenient to see them without downloading.
parent d764b26b
...@@ -356,7 +356,7 @@ func getPublicFile(c *Context, w http.ResponseWriter, r *http.Request) { ...@@ -356,7 +356,7 @@ func getPublicFile(c *Context, w http.ResponseWriter, r *http.Request) {
} }
defer fileReader.Close() defer fileReader.Close()
err = writeFileResponse(info.Name, info.MimeType, info.Size, fileReader, true, w, r) err = writeFileResponse(info.Name, info.MimeType, info.Size, fileReader, false, w, r)
if err != nil { if err != nil {
c.Err = err c.Err = err
return return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment