mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-24 16:44:28 -03:00
añadido codigo para setear la imagen en el formData y reiniciar los
valores en el mismo
This commit is contained in:
@@ -25,10 +25,15 @@
|
|||||||
cargando = true;
|
cargando = true;
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('content', mensaje);
|
formData.append('content', mensaje);
|
||||||
formData.append('imagen', imagen);
|
if (imagen) {
|
||||||
|
formData.append('image', imagen);
|
||||||
|
}
|
||||||
// formData.append('parentPostId', '');
|
// formData.append('parentPostId', '');
|
||||||
mostrarError = await publicarPost(formData);
|
mostrarError = await publicarPost(formData);
|
||||||
if (mostrarError == '') mensaje = '';
|
if (mostrarError == '') {
|
||||||
|
mensaje = '';
|
||||||
|
imagen = null;
|
||||||
|
}
|
||||||
cargando = false;
|
cargando = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user