This topic is locked

Restricting image size

8/16/2006 4:20:08 AM
ASPRunnerPro General questions
F
Faizan author

Hi,
I have a input form where users input certain details about themselves including an image. I want to restrict the size of this uploaded image (probably to 100kb). I searched in the forums and came across the following thread:
http://www.asprunner.com/forums/index.php?...6&hl=image+size
However, I think the solution above is for the older version of ASP Runner (I am using version 4.0) or for a standalone page that is used to upload the image (since it asks user to make changes to a page called uploader.asp, which i do not have). My image upload exists on a form that is part of the add.asp page.
Thanks,

Faizan.

J
Jane 8/16/2006

Faizan,
open ..._add.asp file, find following line:

rs("Picture").AppendChunk strValue



and replace it with this one:

if lenb(strValue)>102400 then

response.write "Maximum picture size is 100Kb. Please reduce file size or upload another picture.<"

else

rs("Picture").AppendChunk strValue

end if