3 Replies Latest reply on Apr 7, 2009 5:09 PM by valatharv

    richfaces 3.3.0 - file upload suggestion

    valatharv

      We need to provide file filter using fileupload component.
      From seam forum I came to know that richfaces 3.3.0 supports this.

      Please let me know where I can find a sample.

      Requirement :
      a) When user clicks on Add button, it should point to specific directory with specific files filtered.
      Example : "\\uploadFiles\*-upload.xml"
      i.e. user should see only files ending with say "-upload.xml" and clicking on Add should point to "uploadFiles" directory by default.

      b) User does not want "Upload" button (how can we disable this), upload will be taken care on Clicking Save.

      Any sample will help.

      Thanks

        • 1. Re: richfaces 3.3.0 - file upload suggestion
          ilya_shaikovsky

          1) you could filter the files only within the flash mode. if you turn it on - only the files with accepted file types will be displayed.
          2) we could not allow to select directory on the users machine because of the security restrictions..
          3) it is possible to hide the button with CSS and use beforeSubmit() JS api function

          • 2. Re: richfaces 3.3.0 - file upload suggestion
            nbelaevski

             

            "valatharv" wrote:
            a) When user clicks on Add button, it should point to specific directory with specific files filtered.
            Example : "\\uploadFiles\*-upload.xml"
            i.e. user should see only files ending with say "-upload.xml" and clicking on Add should point to "uploadFiles" directory by default.

            We can put restrictions on types of files accepted. We cannot start browsing files from the arbitrary directory, however application users can create favorite link in file selection dialog themselves and move there quickly.

            • 3. Re: richfaces 3.3.0 - file upload suggestion
              valatharv

              Thanks for the reply. I will try your suggestions...