From 6b3344bd41c569a64d3a6fab6296833cf0b3546e Mon Sep 17 00:00:00 2001
From: "anatoly@nspcc.ru" <anatoly@nspcc.ru>
Date: Wed, 10 Jun 2020 20:38:03 +0300
Subject: [PATCH] update

---
 receive.go | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/receive.go b/receive.go
index f257290..58109e6 100644
--- a/receive.go
+++ b/receive.go
@@ -113,7 +113,7 @@ func (a *app) receiveFile(c *fasthttp.RequestCtx) {
 func receiveObject(c *fasthttp.RequestCtx, cli object.Service_GetClient) error {
 	var (
 		typ string
-		content_disp_type string
+		content_disp_type string = "inline"
 		put = c.Request.URI().QueryArgs().GetBool("download")
 	)
 
@@ -142,9 +142,7 @@ 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"
-						}
+						} 
 						// 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))
 					}