Use object.FilenameHeader instead custom constant

This commit is contained in:
Evgeniy Kulikov 2020-02-04 14:00:45 +03:00
parent 461a4acea0
commit 53244fcaf3
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
2 changed files with 1 additions and 3 deletions

View file

@ -1,7 +1,5 @@
package main
const DropInFilenameHeader = "drop-in-filename"
var (
Build = "now"
Version = "dev"

View file

@ -97,7 +97,7 @@ func (r *router) receiveFile(c echo.Context) error {
if hdr := obj.Headers[i].GetUserHeader(); hdr != nil {
c.Response().Header().Set("x-"+hdr.Key, hdr.Value)
if hdr.Key == DropInFilenameHeader && download {
if hdr.Key == object.FilenameHeader && download {
c.Response().Header().Set("Content-Disposition", "attachment; filename="+hdr.Value)
}
}