V
Viktor Popov
How could I upload files which are less than 100K only?
Thanks,
Viktor
Thanks,
Viktor
How could I upload files which are less than 100K only?
Mark said:Easy enough client-side if your client is happy using ActiveX, and their
security settings will permit it. Something like the following (I haven't
tested this, by the way, but it should be enough to show you how to do
it...)
<html>
<head>
<script language="JavaScript">
function getFileSize(pstrFileSpec)
{
var objFS = new ActiveXObject("Scripting.FileSystemObject");
var objFile = objFS.getFile(pstrFileSpec);
alert(objFile.size + " bytes");
}
</script>
</head>
<body>
<form name="frmTest">
<input type="file" name="txtFile">
<input type="button" name="cmdSize" value="File Size"
onClick="getFileSize(document.frmTest.txtFile);">
</form>
</body>
</html>
Alternatively, you'll have to do it server-side...
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.