What have you tried? What issues have you encountered while trying it?
We aren’t here to write it, for you. We are here to help you if you encounter issues while writing it, yourself.
That’s kind of what I thought. I would assume that kind of information would really be best done server-side. Upload it, check the dimensions, delete it if it doesn’t meet the criteria, move it if it does.
Or maybe resize it so it does meet the criteria.
But yes, AFAIK unless you use a Java Applet or ActiveX (which aren’t likely to be allowed) the image would need to be uploaded.
Hmmm, I’ve not heard of this before
I think felgall means this: https://developer.mozilla.org/en-US/docs/Web/API/FileReader
That looks like it has some potential. If MozDev is to believed it looks good enough to start trying now.
Browser compatibility Desktop Feature Firefox (Gecko) Chrome Internet Explorer* Opera* Safari Basic support 3.6 (1.9.2) 7 10 12.02 6.0.2 Mobile Feature Firefox Mobile (Gecko) Android IE Mobile Opera Mobile Safari Mobile Basic support 32 3 10 11.5 6.1
You can’t trust the browser either - so validating from the server is a must.
Get the server checks done first as they’re more fundamental to the process, and only when the server-side of things is working should you come back to attempting it from the client-side browser.
Thanks for reply.
To do that you are going to need to upload the file to the server first and then use an ajax call to server side functions to get the dimensions that can then be passed back to the browser. Those browsers don’t support any client side only processing that will even get you started on finding out the dimensions as they have no file access whatoever.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.