• Hi, I think there is an error in the file module.
    If in a form you put different file fields and the user tries to upload two files with the same local name, the form can fail because it sums up the two files’ dimensions and if the sum overcomes the limit settled for one of them, the form doesn’t validate.
    I have just seem this behaviour, and now I will try to find a solution.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter Giuseppe

    (@mociofiletto)

    It will be online tomorrow or the next day. I will post URL here. Now it is not reachable from outside our intranet.
    Thanks

    Thread Starter Giuseppe

    (@mociofiletto)

    https://www.vivatacademia.org/?p=731

    This is the form where I have seen this error.
    Try to add the same file in all 4 file fields. Each file field is set as:
    limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    See Editing form template

    What content do you have in the Form tab panel?

    Thread Starter Giuseppe

    (@mociofiletto)

    <b>Allegati</b> (max 1.5 mega byte per file, estensioni ammesse: pdf jpg jpeg tif tiff)
    
    <label> 1 - Autocertificazione attestante l’iscrizione ad uno dei corsi di studio dell’Alma Mater Studiorum – Università di Bologna, con indicazione degli esami sostenuti, voto conseguito e media ponderata:
    [file* autocertificazione-esami limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff] </label>
    
    <label> 2 - Lettera di referenze, a firma autografa del Presidente o del Legale Rappresentante di una delle entità associative Studentesche riconosciute dall’Alma Mater Studiorum – Università di Bologna, che attesti l’impegno sostenuto dal candidato nella partecipazione alla vita associativa studentesca:
    [file* lettera-referenze-associazione limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff]</label>
    
    <label> 3 - Copia di un documento d'identità in corso di validità
    [file* documento-identita limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff]</label>
    
    <label> 4 - Attestazione ISEE 2019 o ISEE 2020 del nucleo familiare di appartenenza 
    [file* attestazione-ISEE limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff]</label>
    
    [acceptance accettazione-regolamento] Dichiaro di aver preso visione del <a href="https://www.vivatacademia.org?p=117" target="_blank">bando di concorso</a> e di accettarne il contenuto [/acceptance]
    [acceptance accettazione-privacy] Dichiaro di aver preso visione <a href="https://www.vivatacademia.org?p=654" target="_blank">dell'informativa sulla privacy</a> e di accettarne il contenuto [/acceptance]

    • This reply was modified 3 years, 11 months ago by Giuseppe.
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    form can fail because it sums up the two files’ dimensions and if the sum overcomes the limit settled for one of them, the form doesn’t validate.

    Do you see any validation error message under the file field?

    Thread Starter Giuseppe

    (@mociofiletto)

    Thanks for your attention takayukister.
    Yes it fails saying file is too big.
    Try from here: https://www.vivatacademia.org/_test_cf7_form/
    This is just the “default module” with added 4 files fields.

    Try to send a file with the same name of 1.4mb or less, or 4 different files with the same name.

    This is the form code:

    <label> Il tuo nome (obbligatorio)
        [text* your-name] </label>
    
    <label> La tua email (obbligatorio)
        [email* your-email] </label>
    
    <label> Oggetto
        [text your-subject] </label>
    
    <label> Il tuo messaggio
        [textarea your-message] </label>
    
    <b>Allegati</b> (max 1.5 mega byte per file, estensioni ammesse: pdf jpg jpeg tif tiff)
    
    <label> 1 - FILE 1:
    [file* autocertificazione-esami limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff] </label>
    
    <label> 2 - FILE 2:
    [file* lettera-referenze-associazione limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff]</label>
    
    <label> 3 - FILE 3:
    [file* documento-identita limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff]</label>
    
    <label> 4 - FILE 4:
    [file* attestazione-ISEE limit:1.5mb filetypes:pdf|jpg|jpeg|tif|tiff]</label>
    
    [submit "Invia"]
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    In the first place why do you submit files of the same name into four different fields?

    Thread Starter Giuseppe

    (@mociofiletto)

    There is no need to do that. Just testing a form, we have seen this behaviour and I thought it was a bug, so I reported it.
    I think that it is expected that size limit is checked on just one file and it can be confusing to see file size alert if the files are different (even if they have the same name).

    • This reply was modified 3 years, 11 months ago by Giuseppe.
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    I see. Thanks for reporting. I’ll dig deeper and fix it if necessary.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error in file module’ is closed to new replies.