It will only scale it down proportional to the width/height.
I don't understand what you mean here. It seems to me if you specify a width of 400 and a height of 300, it'll scale to exactly that as long as the image is larger than 400x300, is that correct? However, let's say your image is 300x400 then what happens - it gets stretched?
I want to allow users to upload only images, and resize them before them are sent to the server to something reasonable like a maximum of 1024 for height or width. I don't know if the user has their image in landscape or portrait, or anything about the ratio of height to width.
Is there currently a way I can do this?
As an example:
If the user has an image that is 1600 width x 1200 height, I want it to be resized to 1024x768 to maintain aspect ratio.
If it is 1000x1600, I want it resized to 640x1024 to maintain aspect ratio.