fix: adicionar header x-upsert:true para sobrescrever avatars existentes
This commit is contained in:
parent
aa06e0e3ab
commit
4fbfc278bb
@ -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",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
BIN
MEDICONNECT 2/temp_token.txt
Normal file
BIN
MEDICONNECT 2/temp_token.txt
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user