Re: able to upload 28 meg file, yet php.ini limits posts to 10 megs. What is up with that?

Jerry Stuckle wrote:
You can't tell the "file type" until the file is uploaded. All you know is the file name - and a .jpg file does not necessarily have to be a .jpg file - it could be anything.

You also don't know the size before the file is uploaded - again, all you know is the size provided by the browser (if it is - it may not be).

And you can't check anything in your code before the file is uploaded anyway - your code doesn't get control until after the file is uploaded.

There are ways to control the size in HTML, but those can be ignored by the browser.

In short, you can't guarantee anything about the file until it has been uploaded.

Use Flash
an example to check file details before upload