![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/09/2005, 17:44
|
![Avatar de onlykfk](http://static.forosdelweb.com/customavatars/avatar113307_1.gif) | | | Fecha de Ingreso: agosto-2005 Ubicación: 20°45' Latitud Norte 100°
Mensajes: 121
Antigüedad: 19 años, 5 meses Puntos: 1 | |
Validar tamaño de archivo con file Puedes utilizar un Script de tipo js pero necesitaras que el cliente conceda oermisos a tu pagina web para acceso a controles ActiveX en equipo cliente function validaSize(strFilePath) {
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
if (fso.FileExists(strFilePath)) {
f = fso.GetFile(strFilePath);
s = f.Size;
return s;
} else {
return "Archivo no válido";
}
} en tu objeto file agrega el evento onchange
<input type=file onchange="alert(validaSize(this.value))">
__________________ Yo tan sólo se, que no he senado |