Use the filesubmit
event in your ajax listener:
<rich:fileUpload fileUploadListener="#{fileUploadBean.listener}" id="upload" acceptedTypes="jpg, gif, png, bmp"
ontyperejected="alert('Only JPG, GIF, PNG and BMP files are accepted');" maxFilesQuantity="5">
<a4j:ajax event="filesubmit" execute="@none" render="info" />
</rich:fileUpload>
The filesubmit
event is fired before the file is upload
Reference: