Jump to content

How using "Tools" class receive multiple files? ($_FILES)


Recommended Posts

I found function fileAttachment but in my case i have multiple inputs like:

<input type="file" name="userfile[]" id="file_16" class="form-control">
<input type="file" name="userfile[]" id="file_17" class="form-control">

 

This not work:

 

$files = Tools::fileAttachment('userfile');

Link to comment
Share on other sites

  • 11 months later...

Hello, I am implementing a module in prestashop version 1.6, where nese module I intend to attach files and send them by email. If I put this code in the form: array ( 'Type' => 'file', 'Label' => $ this-> l ('Attach documents'), 'Name' => 'FILE', 'Search' => false, 'Orderby' => false, 'Align' => 'center', It can send a file that you select, but you can not select multiple files, and I want to attach several files. Anyone know how I can do it? Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...