From b14341e3442ac306c720c5f710647ccb97fd146a Mon Sep 17 00:00:00 2001 From: Sam Rolfe Date: Mon, 10 Aug 2026 14:13:18 +1000 Subject: [PATCH] fix: admin photo fields -> TextInput + ImageColumn (FileUpload foreach 500 gone); user upload syncs photo_url input so Save keeps the photo; ProductResource photo added --- frontend/internal/handlers/tags.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/internal/handlers/tags.go b/frontend/internal/handlers/tags.go index 4469160..21a4a64 100644 --- a/frontend/internal/handlers/tags.go +++ b/frontend/internal/handlers/tags.go @@ -228,7 +228,9 @@ func (a *App) UploadPhoto(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "text/html; charset=utf-8") - fmt.Fprintf(w, `
Uploaded photo

Photo uploaded ✓

`, photoURL) + // Update the main form's photo_url input so a subsequent Save keeps the photo, + // and show the thumbnail. htmx executes the inline script on swap. + fmt.Fprintf(w, `
Uploaded photo

Photo uploaded ✓

`, photoURL, photoURL) } // CloseTag lets an owner close (retire) their tag. Data is kept; the tag page