You need to handle the file upload control change event. Its better to do that using jQuery on page load. For dependents fields to show there has to be a page postback which will not happen in case of file upload.
var fileName= $(this).val();
var extention= fileName.substr( (fileName.lastIndexOf('.') +1) );
Here ext is the Extention field control CSS class and upload is file upload control CSS class which you can set at field advanced properties.