From 903859a1310e754ab96fe8226dcbc5622fec6803 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Fri, 6 Nov 2026 09:31:51 +0100 Subject: [PATCH] feat(lagoon/attach): export UploadWriterOptions for blob writers that bypass Store (quick-261106-d20) - attach.UploadWriterOptions (was the unexported uploadWriterOptions) gives code that writes an upload to the bucket itself the same Content-Type and Content-Disposition: attachment for non-inline types that attach.Store stores - writeBlob calls it; Store behaviour unchanged - TestUploadWriterOptions table test - lagoon README, docs/database/attachments.md and docs/services/storage.md describe it for writers that bypass attach.Store --- docs/database/attachments.md | 2 ++ docs/services/storage.md | 2 +- modules/lagoon/README.md | 3 ++- modules/lagoon/attach/inline.go | 11 +++++--- modules/lagoon/attach/inline_test.go | 39 ++++++++++++++++++++++++++++ modules/lagoon/attach/store.go | 2 +- 6 files changed, 53 insertions(+), 6 deletions(-) diff --git a/docs/database/attachments.md b/docs/database/attachments.md index 493b5d74..06df8602 100644 --- a/docs/database/attachments.md +++ b/docs/database/attachments.md @@ -139,6 +139,8 @@ The disk name's extension follows the content, not the client's name, because a `attach.Store` writes every file whose type `attach.IsInlineContentType` does not report as a raster image (JPEG, PNG, GIF, WebP, AVIF) with `Content-Disposition: attachment`, so a browser that opens it from a public bucket or through `attach.StaticHandler` and `attach.StaticHandlerPublic` downloads it instead of rendering it. ``, `