Forza la revalidazione dell'avatar dopo la sostituzione della foto

Con cacheControl: "60" l'immagine sostituita poteva restare quella
vecchia per un minuto se la CDN davanti allo storage non varia la
cache in base alla query string di cache-busting (?v=).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-03 14:05:50 +02:00
co-authored by Claude Sonnet 5
parent 0c2a6c5330
commit 70b4123452
+1 -1
View File
@@ -78,7 +78,7 @@ export async function caricaAvatar(id: string, file: File) {
const { error } = await supabase.storage.from(BUCKET).upload(percorso(id), blob, {
contentType: "image/jpeg",
upsert: true,
cacheControl: "60",
cacheControl: "0",
});
if (error) throw error;
}