Very good everyone, I wanted to know if they could help me with a problem, I'm trying to upload a file from Ajax to send to a controller. The error I have is that it does not let me load large files in Ajax, it sends me to the Ajax error. The problem occurs by doing it submit type or before pressing the button to send the controller, the code is the following from Ajax:
function ActualizarArrayAdjuntos(_archivo) {
$.ajax({
cache: false,
async: false,
url: "@Url.Action("ActualizarArrayAdjuntos")",
type: "POST",
data: JSON.stringify({ archivo: _archivo, tipoMantenimiento: _tipoMantenimiento }),
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function (response) {
MsgInformacion(EtiquetasMensaje.Fallo, EtiquetasMensaje.OperacionError);
},
success: function (response) {
if (response == -1) {
MsgInformacion(EtiquetasMensaje.Fallo, "Ocurrio un error a la hora de adjuntar el archivo.");
}
}
});
}
When I try to attach the file it shows the message MsgInformation (MessageMessage.Failure, MessageMessage.OperationError), of the error, this only happens with large files.
Thank you very much