1 Reply Latest reply on May 10, 2008 2:44 PM by harpritt

    FileUpload, the inputStream and the client filename

    harpritt

      Hi Gents and Ladies


      Im using the s:fileupload component in my app and was wondering how i can get the client side file name from the inputStream that gets set in my seam component bean.


      as allways your help is appreciated - also i will send javabased good karma in your direction... ahem, this heat is getting to me



      Oh something that bugged me, setting imediate to true on the upload component bypassed the validation but what i didnt expect was that it also didnt not set my inputstream in my bean,is this expected behaviour.



      
      public InputStream getInputStream() {
      
                return inputStream;
      
           }
      
      
      public void setInputStream(InputStream inputStream) {
      
                this.inputStream = inputStream;
      
           }
      
      



           <s:fileUpload id="picture" data="#{candidateHome.inputStream}" 
      
                    accept="image/jpg"></s:fileUpload>
      
                               <h:commandButton  action="#{candidateHome.upload}" value="tesst"></h:commandButton>