mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -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;
|
||||
const formData = new FormData();
|
||||
formData.append('content', mensaje);
|
||||
formData.append('imagen', imagen);
|
||||
if (imagen) {
|
||||
formData.append('image', imagen);
|
||||
}
|
||||
// formData.append('parentPostId', '');
|
||||
mostrarError = await publicarPost(formData);
|
||||
if (mostrarError == '') mensaje = '';
|
||||
if (mostrarError == '') {
|
||||
mensaje = '';
|
||||
imagen = null;
|
||||
}
|
||||
cargando = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user