Hi,
I'm trying to create a module that generate a database with car brand and models but I'm facing complications and I need you guys.
I'm trying to upload a csv file in config form and then update my table with the value in the csv file.
But I don't know how can I render my csv file to an array, I know that there is str_getcsv in php, but I don't know where can I get the value from the CSV file that I've just uploaded with :
'input' => array(
array(
'name' => 'CPFILTER_CARDATABASE',
'type' => 'file',
'accept' => '.csv',
'desc' => $this->l('Import your CSV file'),
'label' => $this->l('Car Database'),
)
In getConfigForm().
I saw that it's in postProcess function, but what I do to get the value from the CSV just uploaded ?