1
0
Fork 0

ampliacion de limite en upload

This commit is contained in:
humano 2017-12-05 16:15:20 -05:00
parent 4e5cd57668
commit 982f419f77
1 changed files with 3 additions and 2 deletions

View File

@ -68,7 +68,7 @@ function loadArticle(pageNumber,id,plantilla,registros,scroll) {
function comprueba_imagen(campo,item, archivo,campo_mapa) {
extensiones_permitidas = new Array('.gif', '.jpg', '.png');
extensiones_permitidas = new Array('.gif', '.jpg', '.png', '.mp4', '.3gp', '.mov');
mierror = '';
if (!archivo) {
//Si no tengo archivo, es que no se ha seleccionado un archivo en el formulario
@ -143,12 +143,13 @@ function comprueba_archivos(campo,item, archivo,campo_mapa) {
// alert(nombre);
var file = archivoSeleccionado.files[0];
if (file) {
var fileSize = 0;
if (file.size > 1048576)
{ fileSize = (Math.round(file.size * 100 / 1048576) / 100).toString() + ' MB';}
else
{ fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + ' Kb';}
if (file.size > 5242880) {
if (file.size > 62428800) {
alert("El archivo no debe exceder 5MB");
document.getElementById("div_preview_"+nombre).innerHTML = "<div class='alert alert-danger'><h1>Archivo no valido<small> " + file.name+"</small></h1></div>";
document.getElementById("alert_"+nombre).className = "alert alert-warning";