This commit is contained in:
louiscklaw
2025-01-31 22:32:41 +08:00
parent 8a673f6cfc
commit 2f92062c07
35 changed files with 5306 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
//
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 });
}
}