Forums

V5 file upload problem.

kaizoku 14 Apr, 2014
Hi,

I have problem with getting file upload working in ChF V5 with Joomla 3.x
I have switched on file upload, I have specified the file field name as attachement but still, the file is not being saved in the upload path nor it is being attached to email.
Debug shows nothing, the file array is empty and there are no php logs about it either. The dir permissions are OK for sure.

I was trying to debug it more but dont know where to start. Which lib from cegcore is used for file upload and attachement?
Max_admin 14 Apr, 2014
Hi kaizoku,

Please post a screenshot for your form setup ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
kaizoku 14 Apr, 2014
Answer
I think I have found the problem in this file:
administrator/components/com_chronoforms5/chronoforms/actions/file_upload.php
This line is giving delimiter error and thus files extensions doesnt match:
$file_extensions = explode($config->get('extensions_separator', '-'), $file_data[1]);


I have changed it to::
$file_extensions = explode('-', $file_data[1]);


Now the file upload is working as expected. Or I have some config error or for some reason config->get is not working correctly in this case.

What tab of my config you need?
Max_admin 14 Apr, 2014
It should work fine unless you removed the separator in the action settings ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
kaizoku 14 Apr, 2014
I was using simple setup so I havent touched the action settings. If '-'is not there then it means that the default settings are probably wrong?
Besides, I havent look into config class so I dont know for sure, but does the this $config->get('extensions_separator', '-')
basically means get setting named extensions_separator and when it is not set use '-' as default?
So unless something is wrong with get function I dont see why this is not working.

Just wondering...
Max_admin 15 Apr, 2014
Thanks, bug found and fixed!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
mariiika 01 May, 2014
Hi,
I have the same problem with field upload. But I have one valid format files zip. So the problem is not in the separators?
Max_admin 01 May, 2014
Just add "-" to the separators field ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.