Actualizacion

parent 71cdb509
......@@ -222,7 +222,7 @@
if(imagenTomada == true && imagenSubida == false){
formData.append("upload_file", false);
formData.append("imagen", $("#imagenUsuario").attr('src'));
formData.append("imagen", $("#photo").attr('src'));
}else if(imagenSubida == true && imagenTomada == true){
formData.append("upload_file", true);
}
......
......@@ -67,8 +67,8 @@ class DefaultController extends Controller {
$log->debug("guardando datos de ip $ip...");
if (empty($file)) {
return new JsonResponse(array("msg" => "No se subio una imagen", "tipo" => UsuarioNutrapharm::ESTADO_FOTO_INICIAL), Response::HTTP_BAD_REQUEST, ['content-type' => 'text/plain']);
if ($uploadFile && empty($file)) {
return new JsonResponse(array("msg" => "No se subio una imagen", "tipo" => UsuarioNutrapharm::ESTADO_FOTO_INICIAL), Response::HTTP_BAD_REQUEST, ['content-type' => 'application/json']);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment