Forms Module File Attachments
Hi
I've built a form using the forms module that has an option to attach a file. In my config I have set it to allow doc, docx and pdf as per below, however only PDFs ever come through attached to an email.
$config['forms']['attach_file_params'] = array(
'upload_path' => APPPATH.'cache/',
'allowed_types' => 'pdf|doc|docx',
'max_size' => '1000',
);
I've tried changing the path to one in my assests folder that is set to allow all the above file types but it is still not working. It only seems to want to write PDFs to the temporary folder and therefore that is all I get attached to messages. Any Ideas?
Thanks
Comments
if ( ! $this->CI->upload->do_upload($key)) { $error = array('error' => $this->CI->upload->display_errors()); $this->_add_error($error); } else { $this->upload_data[$key] = $this->CI->upload->data(); }