fix: adicionar header x-upsert:true para sobrescrever avatars existentes

This commit is contained in:
guisilvagomes 2025-10-28 11:35:04 -03:00
parent aa06e0e3ab
commit 4fbfc278bb
2 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class AvatarService {
}); });
// Upload usando Supabase Storage API // Upload usando Supabase Storage API
// x-upsert: true permite sobrescrever arquivos existentes
// Importante: NÃO definir Content-Type manualmente, deixar o axios/navegador // Importante: NÃO definir Content-Type manualmente, deixar o axios/navegador
// definir automaticamente com o boundary correto para multipart/form-data // definir automaticamente com o boundary correto para multipart/form-data
const response = await axios.post( const response = await axios.post(
@ -53,6 +54,7 @@ class AvatarService {
{ {
headers: { headers: {
"Authorization": `Bearer ${token}`, "Authorization": `Bearer ${token}`,
"x-upsert": "true",
}, },
} }
); );

Binary file not shown.