jmauclair Posted June 14, 2021 Share Posted June 14, 2021 (edited) 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 ? Edited June 14, 2021 by jmauclair Error (see edit history) Link to comment Share on other sites More sharing options...
jmauclair Posted June 17, 2021 Author Share Posted June 17, 2021 No clues guys ? Link to comment Share on other sites More sharing options...
jmauclair Posted June 20, 2021 Author Share Posted June 20, 2021 (edited) found another way to do it Edited June 20, 2021 by jmauclair Error (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now