fix: remover Content-Type manual do upload de avatar (deixar axios definir boundary)

This commit is contained in:
guisilvagomes 2025-10-28 11:29:06 -03:00
parent 7c1999733e
commit aa06e0e3ab

View File

@ -41,16 +41,18 @@ class AvatarService {
fileName: data.file.name,
fileSize: data.file.size,
fileType: data.file.type,
token: token ? `${token.substring(0, 20)}...` : "null",
});
// Upload usando Supabase Storage API
// Importante: NÃO definir Content-Type manualmente, deixar o axios/navegador
// definir automaticamente com o boundary correto para multipart/form-data
const response = await axios.post(
`${this.STORAGE_URL}/${this.BUCKET_NAME}/${filePath}`,
formData,
{
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "multipart/form-data",
},
}
);