File info before upload

Is there anyway to define file type and size after user browsed it, before actually upload it?

Not in PHP. PHP runs on the server so until the file reaches the server PHP knows nowt about it.

and HTML can only specify a maximum size on the file, not on the type.

Javascript can access this information, but the standard javascript caveats apply (javascript can be disabled, depends on the version of the browser, etc.)

The file object has a size property.

Is there a jQuery plugin too?

Why do you think a jQuery plugin is needed? File is part of the native JavaScript API in modern browsers.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.