fix: admin upload action fillForm()->refreshFormData(['photo_url']) (fillForm threw in action closure); photo cache-busting (?v=updated_at) so overwritten photos don't show stale browser cache (user 'reverting to old images')

This commit is contained in:
2026-08-10 16:18:08 +10:00
parent 0a66d92d31
commit fd91d3c53e
6 changed files with 10 additions and 4 deletions

View File

@@ -26,7 +26,7 @@
<div class="mt-4 rounded-xl border border-stone-200 p-4">
<h2 class="font-bold">About your {{if .Data.ItemType}}{{.Data.ItemType}}{{else}}item{{end}}</h2>
<div class="mt-2 flex gap-4">
{{if .Data.PhotoURL}}<img src="{{.Data.PhotoURL}}" alt="Your item" class="h-28 w-28 rounded-lg object-cover">{{end}}
{{if .Data.PhotoURL}}<img src="{{.Data.PhotoURL}}?v={{.Data.UpdatedAt.Time.Unix}}" alt="Your item" class="h-28 w-28 rounded-lg object-cover">{{end}}
<div class="text-sm">
{{if .Data.Name}}<p class="font-medium">{{.Data.Name}}</p>{{end}}
{{if .Data.Address}}<p class="text-stone-600">{{.Data.Address}}</p>{{end}}