如何在Next.js API中读取Postman上传的CSV并转为数组
在Next.js API中读取Postman上传的CSV文件遇到问题
我在Next.js API路由中尝试读取从Postman上传的CSV文件,但req.file和req.files['file']均返回undefined,使用的代码如下:
export default async function handler(req, res) { console.log(req.body); // console.log(req.file); // Undefined // console.log(req.files['file']); // Undefined }
我的目标是读取该CSV文件并将其转换为数据数组,寻求解决帮助。

内容的提问来源于stack exchange,提问作者user9769384
相关产品推荐
相关产品推荐

