fix: change Content-Disposition to inline for proper document display in attachments (#950)

This commit is contained in:
Tonya
2025-08-21 15:59:13 +01:00
committed by GitHub
parent 8af1e8fcba
commit 900604661b

View File

@@ -205,7 +205,7 @@ func (ctrl *V1Controller) handleItemAttachmentsHandler(w http.ResponseWriter, r
}(bucket) }(bucket)
// Set the Content-Disposition header for RFC6266 compliance // 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) w.Header().Set("Content-Disposition", disposition)
http.ServeContent(w, r, doc.Title, doc.CreatedAt, file) http.ServeContent(w, r, doc.Title, doc.CreatedAt, file)
return nil return nil