Hi, im trying to check the file size for http upload.
The upload is working fine but im having some dificulties with the filesize check, i belive theres no way to check that before the upload so i was doing something like this.
But i only i only get the response.write "1".
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Set MyFile = ScriptObject.CreateTextFile(pasta & nome_ficheiro)
For i = 1 to LenB(ficheiro)
'intMaxFileSize = 102400
If MyFile.Size > 102400 Then
ScriptObject.DeleteFile(pasta & nome_ficheiro)
This is not ideal after all it allow the upload and only than do the check.
Can anyone see whats wrong with this script or if theres a way to check the filesize before upload?