From 34747336dd5229311620adfb91b11d86d5fd00ce Mon Sep 17 00:00:00 2001 From: Finley Ghosh Date: Mon, 8 Dec 2025 21:41:22 +1100 Subject: [PATCH] Changing attachments to use php path --- go/internal/cmc/handlers/attachments/attachments.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/internal/cmc/handlers/attachments/attachments.go b/go/internal/cmc/handlers/attachments/attachments.go index 09c6eec7..0b48f3aa 100644 --- a/go/internal/cmc/handlers/attachments/attachments.go +++ b/go/internal/cmc/handlers/attachments/attachments.go @@ -172,11 +172,13 @@ func (h *AttachmentHandler) Create(w http.ResponseWriter, r *http.Request) { } // Create database record + // Store path in PHP format: /var/www/cmc-sales/app/webroot/attachments_files/filename + phpPath := "/var/www/cmc-sales/app/webroot/attachments_files/" + filename params := db.CreateAttachmentParams{ PrincipleID: int32(principleID), Name: name, Filename: handler.Filename, - File: filePath, // Store full path for PHP compatibility + File: phpPath, // Store PHP container path for compatibility Type: handler.Header.Get("Content-Type"), Size: int32(handler.Size), Description: description,