Forums

Problem with validation of file upload

tlant 22 Apr, 2009
Hi,

I have a problem with the validation of the file uploads. I have a form which contains 3 upload fields. I want to check these files on type (doc, pdf,zip) and on size, but for some reason the validation isn't triggered. The only thing I noticed, files of an incorrect type (e.g. jpg) are not sent or stored on the server.

The form code (only included the upload files):
<table>

<tr>
	<td colspan="2"><b>Scriptiebijlagen</b> 
	<br>Upload de volgende bijlagen (totaal maximaal 10000 KB)
	</td>
</tr>

<tr>
	<TD>Samenvatting</TD>
	<TD><input type="file" name="ExamSummaryAttachment" id="ExamSummaryAttachment" />
	<B>*</B>	</TD></TR>
</tr>
<tr>
	<TD>Volledige scriptie</TD>
	<TD><input type="file" name="ExamAttachment" id="ExamAttachment" />

	<B>*</B>	</TD></TR>
</tr>
<tr>
	<TD>Bewijs van afstuderen (bewijs van cijfer waarmee scriptie beoordeeld is of cijferlijst)</TD>
	<TD><input type="file" name="ExamCertificateAttachment" id="ExamCertificateAttachment" />
	<B>*</B>	</TD></TR>
</tr>

</table>


The file upload settings:
ExamSummaryAttachment:doc|zip|pdf{2000-1},ExamAttachment:doc|zip|pdf{7000-1},ExamCertificateAttachment:doc|zip|pdf{1000-1}


What am I doing wrong?
Max_admin 22 Apr, 2009
Hi tlant,

so if you tried to upload a jpg file and submit the form, what happens ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tlant 23 Apr, 2009
When submitting a jpeg file, the form is submitted and sent. I get a message saying thanks for your reply (as set in the from settings)

The only difference with submitting a doc file is the fact that a jpeg file is not added as an attachment to the email and the jpeg file is not saved on the server. Doc and pdf files are sent as an attachment and saved on the server.
Max_admin 24 Apr, 2009
So you don't get an error because you upload a jpeg file which is not a supported extension ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tlant 24 Apr, 2009
No, no error. I was expecting one, but not error appears and the email is sent
GreyHead 24 Apr, 2009
Hi tlant,

I just ran a test in RC 4.11 and couldn't reproduce this. The error message appeared each time I tried with an incorrect file type.

Bob
tlant 24 Apr, 2009
strange, i'll do some retesting
tlant 24 Apr, 2009
As far as I can tell, we are using '3.0 STABLE 17.09.2008'. Could that be a problem?
GreyHead 24 Apr, 2009
Hi tlant,

Could be - the RC4.11 is a Release Candidate but it's pretty stable and an improvement over 3.0 stable

Bb
This topic is locked and no more replies can be posted.