title: t:inputFileUpload always return null while submitting form
body: <pre><code>&lt;h:body&gt;
    &lt;div id="main" align="center" style="width:100%;height: 100%"&gt;
      &lt;f:view&gt;
        &lt;h:form id="catform" enctype="multipart/form-data"&gt;
          &lt;p:panel styleClass="ui-panel-titlebar"  id="panel1" header="Add New Category" &gt;
            &lt;h:panelGrid columns="3" style="border:0px"  styleClass="ui-panel-content"&gt;
              &lt;h:outputText value="Parent Category:"  /&gt;
              &lt;h:selectOneMenu id="parentcat" value="#{CategoryMB.selectedCatId}"&gt;
                &lt;f:selectItems value="#{CategoryMB.categories}" var="cat" itemLabel="#{cat.categoryName}" itemValue="#{CategoryMB.categoryId}" /&gt;
              &lt;/h:selectOneMenu&gt;
  
              &lt;p:message for="parentcat" /&gt;
  
              &lt;h:outputText value="Category Name:" /&gt;
              &lt;p:inputText id="catname" value="#{CategoryMB.catName}" required="true" requiredMessage="Category must requried !" /&gt;
  
              &lt;p:message for="catname" /&gt;
  
              &lt;h:outputText value="Category Logo:" /&gt;
  
              &lt;t:inputFileUpload storage="file" id="catImageUpload" value="#{CategoryMB.file}" style="display: inline;vertical-align: baseline;margin-bottom: 10px;"/&gt;
  
              &lt;h:message for="catImageUpload" /&gt;
  
              &lt;h:outputText value="Description" /&gt;
  
              &lt;p:inputTextarea id="desc" cols="10"  autoResize="false" rows="4" value="#{CategoryMB.description}"&gt;&lt;/p:inputTextarea&gt;
  
              &lt;p:message for="desc" id="descmsg" /&gt;
  
              &lt;f:facet name="footer"&gt;
  
                &lt;p:commandButton value="Add Category" update="growl" action="#{CategoryMB.addCategory}" icon="ui-icon-check" /&gt;
  
              &lt;/f:facet&gt;
            &lt;/h:panelGrid&gt;
          &lt;/p:panel&gt;
  
          &lt;p:growl id="growl" showDetail="true" life="5000" /&gt;
  
        &lt;/h:form&gt;
      &lt;/f:view&gt;
  </code></pre>
  
  
  
  <pre><code>public void UploadImage() { 
  
      System.out.println("hi");
  
      UploadedFile myfile = getFile();
  
      byte[] buffer = null;
  
      File tempfile=null;
  
      if(myfile!=null)
      {
          String prefix = FilenameUtils.getBaseName(myfile.getName());
          String suffix = FilenameUtils.getExtension(myfile.getName());
  
          try
          {
  
              realPath= FacesContext.getCurrentInstance().getExternalContext().getRealPath("/Resources/CategoryImage");
  
              tempfile = File.createTempFile(prefix + "_", "." + suffix, new File(realPath));
  
              OutputStream out = new FileOutputStream(tempfile);
  
              InputStream in = new BufferedInputStream(myfile.getInputStream());
  
              this.catImage = tempfile.getName();                
  
              try {
  
                  buffer = new byte[64 * 1024];
  
                  int count;
  
                  while ((count = in.read(buffer)) &gt; 0)
                      out.write(buffer, 0, count);
  
              } finally {
  
                  in.close();
  
                  out.close();
  
              }   
  
              FacesContext context = FacesContext.getCurrentInstance();  
  
              context.addMessage(null, new FacesMessage("Successful", "Successfully added category! " + catName));  
  
          }
          catch(IOException e)
          {   
              e.printStackTrace();
          }   
      }
  </code></pre>