3.2.0

Validate file size and mime type at client side

Does anyone know how to do that?? i NEED to check size and type before upload a file to server, and i dont want to use ActiveX Objects.

Tnx for comments.
Nahomi
March 6,
Check this this may helps you

function A()
{
var oas = new ActiveXObject("Scripting.FileSystemObject");
var d = document.a.b.value;
var e = oas.getFile(d);
var f = e.size;
alert(f + " bytes");
}

</script>
</head>
<body>
<form name="a">
<input type="file" name="b">
<input type="button" name="c" value="SIZE" onClick="A();">
</form>
</body>
</html>
Kiran
June 3,

This topic is archived.

See also:


Back to support forum