4 Replies Latest reply on Jan 22, 2010 10:32 AM by vitaly straniy

    rich:fileUpload How to avoid transfer error when uploading empty file (0 bytes)

    vitaly straniy Newbie
      <rich:fileUpload id="uploadFileId"

              fileUploadListener="#{listener}"
          allowFlash="false"
          maxFilesQuantity="1"
          immediateUpload="true" />

       

      I use such rich:fileUpload on page and have no problem to upload any non-empty file. But it fails when i try to upload any zero-byte file. Uploading doesn't end or I get transfer error (it depends on browser). onupload event was fired but listener wasn't called. I use richfaces 3.3.2.GA. The same behavior I saw on richfaces demo site.

       

      Can somebody advise me what to do to avoid such behaviour (how to handle empty file uploads proper way in other words)?