commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Breu" <>
Subject AW: get image dimensions before upload?
Date Thu, 13 Dec 2007 22:25:36 GMT
> But the question (as I understand it) was whether it is possible to
> check the dimensions *before* the file is transferred from the client
> machine to the server, ie whether it is possible to get the web-browser
> to do this check.
> And the answer (short of something like activex) is no.

Well, in some browsers (IE6, IE5) it's possible. The image src from the <input type="file">-field
can be assigned to a <img>-tag in the page (possible hidden), then (after loading) the
width and height can be retrieved from this img tag. But this does not work in firefox and
IE7 (according to my tests). So in current browsers it's not possible. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message