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,