Try using the onchange event for file upload field.