Filetype identification

hello,

in actioncript 2.0 filereference, flash provides property to identofy type (extention), but if i rename the file with extention flash is fooled.

is there any way to read the actual type in flash itself, with actionscript 2/3

such that file type filter works securely.