Use stable files API URLs for vendor logo fields

CommonThirdParty.logoUrl and TrustCenterReference.logoUrl were
returning expiring S3 presigned URLs, which break if cached or
shared past their TTL.

Replace with stable /api/files/v1/{id} application URLs.
file.Service now generates these via baseurl; a new filesign
package owns presigning for the files/v1 HTTP handler that
does the internal redirect.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-03 10:21:02 +02:00
parent 383ea5a2d4
commit 6c072a2f7b
14 changed files with 115 additions and 116 deletions

View File

@@ -26,6 +26,7 @@ import (
"go.probo.inc/probo/packages/emails"
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/esign"
"go.probo.inc/probo/pkg/file"
"go.probo.inc/probo/pkg/filemanager"
"go.probo.inc/probo/pkg/gid"
"go.probo.inc/probo/pkg/html2pdf"
@@ -46,6 +47,7 @@ type (
esign *esign.Service
html2pdfConverter *html2pdf.Converter
fileManager *filemanager.Service
file *file.Service
logger *log.Logger
slack *slack.Service
TrustCenters *TrustCenterService
@@ -75,6 +77,7 @@ func NewService(
fileManagerService *filemanager.Service,
logger *log.Logger,
slack *slack.Service,
fileService *file.Service,
) *Service {
svc := &Service{
pg: pgClient,
@@ -86,6 +89,7 @@ func NewService(
esign: esignSvc,
html2pdfConverter: html2pdfConverter,
fileManager: fileManagerService,
file: fileService,
logger: logger,
slack: slack,
}