Jump to content

AI File Extensions in ContactController


Recommended Posts

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

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

×
×
  • Create New...