1 Reply Latest reply on Aug 13, 2008 4:27 AM by Andrei Markavtsov

    rich:fileUpload stop button doesnt work

    Tao Xiao Newbie

      Hi,

      The stop button of rich:fileUpload component does not work if I set the maxRequestSize parameter in web.xml. when I clicked the red stop button, the file uploading was still processing and finally displayed 'file size restricted' message.

      By removing the maxRequestSize parameter in web.xml, the stop button worked as expected. when I clicked the button, the file uploading process stopped and displayed the canel click which allowed me to remove the entry.

      Here is my code

      <rich:fileUpload id="supportingFilesUplaod" listHeight="150"
       fileUploadListener="#{signerManagement.uploadSupportingFile}"
       maxFilesQuantity="10" cleanButtonClass="none"
       sizeErrorLabel="#{messages['upload.documents.upload.size.error.message']}"
       clearAllControlLabel="" clearControlLabel=""
       addControlLabel="#{messages['upload.documents.attach.supporting.button.label']}">
       <f:facet name="label">
       <h:outputText
       value="#{messages['upload.documents.upload.progress.message']}" />
       </f:facet>
       </rich:fileUpload>


      here is the web.xml
      <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
       <init-param>
       <param-name>maxRequestSize</param-name>
       <param-value>10485760</param-value>
       </init-param>
       </filter>


      I am using seam 2.0.2.GA, Richfaces 3.2.1.GA and jboss 4.2.2.GA

      Thanks

        • 1. Re: rich:fileUpload stop button doesnt work
          Andrei Markavtsov Apprentice

          Yes. It works as you said.

          But why do you think that there is something wrong?
          When request size if overflowed server skips request and post back specified message to client.

          When you push STOP client sends AJAX request to server to cancel request.

          In you case you push STOP after file upload started. And request wil not be cancelled on server side because it was already skipped. And 'File Size restricted' message has already be sent to client.

          I think you mean that you have delay before 'File Size restricted' message.
          It caused by browser. It hangs for some time if file is rather big.