Prashant Birajdar
unread,May 18, 2012, 7:49:53 AM5/18/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Joomla! General Development
Code for file upload
I am using this code for frontend contact form
-----------------------------------------------------------------
<label for="attachFile">
<?php echo JText::_( 'Attach File' );?>:
</label>
<br />
<div class="nopad"><input type="file" name="attachFile"
id="attachFile" class="inputbox" value="" /></div>
<br />
-------------------------------------------------------------
in controller.php
$attachFile = JRequest::getVar( 'attachFile', '', 'files',
'array' );
$mail->addAttachment($attachFile); // For attach a
file to email
This code attaches a file in email as a different name like
phpZDFTUg;
This file has correct file size in gmail but don't have correct
filename and its extension.