mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-29 09:55:35 +02:00
Merge branch 'main' into access-api
This commit is contained in:
commit
4f4165f46f
5 changed files with 1873 additions and 19 deletions
server
|
@ -652,6 +652,9 @@ func (s *Server) handleFile(w http.ResponseWriter, r *http.Request, v *visitor)
|
|||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
if m.Attachment.Name != "" {
|
||||
w.Header().Set("Content-Disposition", "attachment; filename="+strconv.Quote(m.Attachment.Name))
|
||||
}
|
||||
_, err = io.Copy(util.NewContentTypeWriter(w, r.URL.Path), f)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue