Use object.FilenameHeader instead custom constant
This commit is contained in:
parent
461a4acea0
commit
53244fcaf3
2 changed files with 1 additions and 3 deletions
2
misc.go
2
misc.go
|
@ -1,7 +1,5 @@
|
|||
package main
|
||||
|
||||
const DropInFilenameHeader = "drop-in-filename"
|
||||
|
||||
var (
|
||||
Build = "now"
|
||||
Version = "dev"
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue