简体   繁体   中英

how can i get a CSV file upload request from client side and parse the data to upload in mySql database in nodejs

I'd like to be able to upload a file and import that to MySQL. I've installed a server to do so. However, I do not know how to upload and process the CSV file.

There are already a node module which you can use csv-parse

You can read you file using fs module and after reading file you can parse it using csv-parse

here are the links https://csv.js.org/ , how to import a csv file to mysql using node.js?

Thank You

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM