title: primefaces fileupload preview not working if extension is in uppercase
body: <p>I am trying to use primefaces advanced fileupload, however I have noticed that when the extension is in uppercase the preview does not work. Below is the upload code.</p>
  
  <pre><code>&lt;p:fileUpload  fileUploadListener="${myController.handleFileUpload}"
                                                 mode="advanced" id="fileupload"                                              
                                                 sizeLimit="2000000"  uploadLabel="Add" 
                                                 dragDropSupport="false" previewWidth="190" 
                                                 label="Browse" style="width: 600px;height: 200px" 
                                                 required="true"  update="fileDescId"
                                                 allowTypes="/(\.|\/)(gif|jpe?g|png|GIF|JPG|JPEG|PNG)$/i"/&gt;
  </code></pre>
  
  <p>Searching on google has not yielded much, I found that adding <code>/i</code> at the end of allowTypes makes the regex case insensitive but still the preview does not show. If I click upload it upload successfully even if the preview did not show, but I need the preview because a description of the image is required.</p>