View Single Post
  #2 (permalink)  
Old 08-02-03, 07:06 PM
Jenny Jenny is offline
Newbie Coder
 
Join Date: Jul 2003
Location: Stockholm
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
The answer is already there!

1) Size
' Read the bytes (binary data) into memory
lnByteCount = Request.TotalBytes
lnBytes = Request.BinaryRead(lnByteCount)

change to

if InByteCount > XXXXXXXX then
response .write "file too large"
response.end
end if

' xxxxxxxxxxx in bytes.


2)
sFileName = oFile.FileName

extension=mid(sFileName,instrrev(sFileName,"."))
if extension <> "exe" or extension <> "zip" or extension <> "txt" then
response .write "not allowed"
response.end
end if


But I would suggest and recommend to use an upload component anyway!

Jenny
Reply With Quote