From 900604661b1e6a7fbac3baca886dd128d33a68fe Mon Sep 17 00:00:00 2001 From: Tonya Date: Thu, 21 Aug 2025 15:59:13 +0100 Subject: [PATCH] fix: change Content-Disposition to inline for proper document display in attachments (#950) --- backend/app/api/handlers/v1/v1_ctrl_items_attachments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go b/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go index e055ec63..27da77ba 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go +++ b/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go @@ -205,7 +205,7 @@ func (ctrl *V1Controller) handleItemAttachmentsHandler(w http.ResponseWriter, r }(bucket) // Set the Content-Disposition header for RFC6266 compliance - disposition := "attachment; filename*=UTF-8''" + url.QueryEscape(doc.Title) + disposition := "inline; filename*=UTF-8''" + url.QueryEscape(doc.Title) w.Header().Set("Content-Disposition", disposition) http.ServeContent(w, r, doc.Title, doc.CreatedAt, file) return nil