// import formidable from "formidable"; import axios from "axios"; import fs from "fs"; // export const config = { // api: { bodyParser: false }, // }; export default async function handler(req, res) { try { // console.log(req.body); const response = await axios.post("http://localhost:5000/uploader", req.body); console.log(response); res.status(200).json(response.data); } catch (error) { res.status(500).json({ error: error.message }); } }