[richfaces-issues] [JBoss JIRA] (RF-12366) Uploading 2 files despite rich:fileUpload:maxFilesQuantity="1"

Thomas Jodes (JIRA) jira-events at lists.jboss.org
Mon Jan 28 06:06:47 EST 2013


    [ https://issues.jboss.org/browse/RF-12366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750735#comment-12750735 ] 

Thomas Jodes edited comment on RF-12366 at 1/28/13 6:06 AM:
------------------------------------------------------------

Having a look at the showcase demo (rf 4.2.3.FINAL), you can upload two or more file in the same case if you do the following:
1. Choose a file.
2. Press Upload.
3. Uploaded File resides in the server now.
4. Delete that file in the widget.
5. You can begin at step 1. uploaded an other file... and so on ...

So for me, the documentation's quote:
"maxFilesQuantity

    The maxFilesQuantity parameter defines maximum number of files allowed to be uploaded. After a number of files in the list equals to the value of this attribute, "Add" button disappears and nothing could be uploaded even if you clear the whole list. In order to upload files again you should rerender the component."

is broken.
                
      was (Author: jenskreidler):
    Having a look at the showcase demo (rf 4.2.3.FINAL), you can upload two or more file in the same case if you do the following:
1. Choose a file.
2. Press Upload.
3. Uploaded File resides in the server now.
4. Delete that file in the widget.
5. You can begin at step 1. uploaded an other file... and so on ...

My first thougts on that is that the upload component uses plain javascript - NOT evaluating any server-side relevant data. Thus setting the disabled-attribute in rich:fileUpload will not work to restrict the max. number of files.
                  
> Uploading 2 files despite rich:fileUpload:maxFilesQuantity="1" 
> ---------------------------------------------------------------
>
>                 Key: RF-12366
>                 URL: https://issues.jboss.org/browse/RF-12366
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-input
>    Affects Versions: 4.2.2.Final
>         Environment: JDK1.6,
> JBoss 6.0.Final
> richfaces 4.2.2.Final
> seam 3.1
> Chrome
>            Reporter: Artur Mioduszewski
>             Fix For: 5-Tracking
>
>
> Button 'Add' does not disable after starting file uploading.
> In case: maxFilesQuantity="1" in rich:fileUpload I am able to upload more than 1 file using below scenario:
> I start to upload large file lala.wmv. During uploading of lala.wmv file, button "Add" is not blocked, so I am able to select second file to upload.
> Finally 2 files are uploaded despite maxFilesQuantity="1".   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list