title: p:upload file doesn't work with pdf extension neither of the rest of extension like png,docx,jpeg,gif?
body: <p>and I cant' store file more than 10Mb 
  the primary problrm is why doesn't except pdf file???
  this is my ManagedBean
  file upload function :-</p>
  
  <pre><code>public void fileUploadListener(FileUploadEvent e) throws IOException, Exception {
  
      this.file = e.getFile();                
      File oStream = new File("c:\\test.pdf");
      courseResourceBean.update(item);
      oStream.createNewFile();
      Long sss = file.getSize();
      InputStream inputStream = file.getInputstream();
      FileOutputStream outputStream = new FileOutputStream(oStream);
      byte[] buffer = new byte[sss.byteValue()];
      int lenght;
      while ((lenght = inputStream.read(buffer)) != -1) {
          outputStream.write(buffer, 0, lenght);
      }
      outputStream.close();
      FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("File Uploaded Successfully" + file.getSize()));
      String extension = file.getContentType();
  
  }
  </code></pre>
  
  <p>file download function :-</p>
  
  <pre><code>public void prepDownload(Long id) throws Exception {
      File files = new File("c:\\test.pdf");
      InputStream input = new FileInputStream(files);
      ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      setDownload(new DefaultStreamedContent(input, externalContext.getMimeType(files.getName()), files.getName()));
      System.out.println("PREP = " + download.getName());
  }
  </code></pre>
  
  <p>and this is the xhtml page
  upload :-</p>
  
  <pre><code>&lt;p:outputLabel value="#{msg.courseName}, #{msg.inArabic}" style="text-align: right"/&gt;
          &lt;p:fileUpload value="#{courseResourceMB.file}" mode="advanced" sizeLimit="200000000000" 
                        fileUploadListener="#{courseResourceMB.fileUploadListener}" update="msg11" &gt;
  
  
          &lt;/p:fileUpload&gt;
  </code></pre>
  
  <p>downlad:-</p>
  
  <pre><code>&lt;p:commandButton id="downloadLink" value="Download" actionListener="#{courseResourceMB.prepDownload(item.id)}" ajax="false"&gt; 
                  &lt;p:fileDownload value="#{courseResourceMB.download}" /&gt;
              &lt;/p:commandButton&gt;
  </code></pre>