starsg38 Posted May 29, 2014 Share Posted May 29, 2014 I have modified my ContactConroller.php to accept some more file extensions such as psd & tif. The psd & tif will go through the contact form fine but when I try to attach an ai it says it is an invalid file extension. Does anyone know if prestashop is by default set up to reject file extensions that are only two letters or less? If so, what file do I need to edit to change that? Link to comment Share on other sites More sharing options...
NemoPS Posted May 30, 2014 Share Posted May 30, 2014 3 is the bare minimum, look else if (!empty($fileAttachment['name']) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -4)), $extension) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -5)), $extension)) You might want to add a -3 entry as well for the 2 digits extension (this comes right below the extensions array) Link to comment Share on other sites More sharing options...
starsg38 Posted May 30, 2014 Author Share Posted May 30, 2014 Yes that worked! Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts