update format
This commit is contained in:
parent
793d21651b
commit
f9e1e50da1
1 changed files with 4 additions and 1 deletions
|
@ -142,7 +142,10 @@ func receiveObject(c *fasthttp.RequestCtx, cli object.Service_GetClient) error {
|
|||
if hdr.Key == object.FilenameHeader {
|
||||
if put {
|
||||
content_disp_type = "attachment"
|
||||
} else { content_disp_type = "inline"}
|
||||
}
|
||||
else {
|
||||
content_disp_type = "inline"
|
||||
}
|
||||
// NOTE: we use path.Base because hdr.Value can be something like `/path/to/filename.ext`
|
||||
c.Response.Header.Set("Content-Disposition", content_disp_type+"; filename="+path.Base(hdr.Value))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue