[Javascript] Resizing images client-side

tedd tedd at sperling.com
Fri Jul 13 20:04:14 CDT 2007


At 11:34 PM +0000 7/13/07, Troy III Ajnej wrote:
>Hi Paul
>
>Hahahahaa,
>If I wasn't drunked last night and didn'tmcompletely missunderstood
>the problem, I believe it is very easy to get it done via javascript.
>
>As I remember (?)Tedd asked about how to disable or prevent the
>client from uploading large pictures, suppose, not bigger than 500k.
>
>All it takes is just a little bit of imagination or creativity. I 
>will describe
>the routine not the code itself since you all know how writte one.
>
>You will need a "bypass function" for "submit".
>1. get the picture file to load on the page.
>2. use the onload event of the image object to check for image filesize.
>3. compare, the actuall f-size with your max limit size, and let the "con-
>ditional" decide what statement to execute.
>4 That is: alert box that tells the user the file exceeds the maximum
>alowed or submit it right away.
>
>And it will all take only a second for the function to complete.
>
>If I wasn't clear, please dont hesitate to ask. I might find some time to
>actually write the code and post it here.
>:)
>Regards
>

I couldn't help but think there was something like that -- however -- 
I couldn't find it. I did read about the FileUpLoad Object, but it 
does not provide a size property.

Would love to see what you might make.

Cheers,

tedd


-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list