ivandpfI
Denoβ€’2y agoβ€’
3 replies
ivandpf

PHP to Javscript little code

if ($_SERVER["REQUEST_METHOD"] == "POST") {
 if (isset($_FILES["file"])) {
        $file= $_FILES["file"];
 }
}

Which is the equivalent of that code to Javscript?

I have atm that
export async function csvMarcatges({ response, request }: Context) {
    if (request.method === "POST") {
            response.status = 200;
            response.body = { message: "Doing Post" };

            let file = 
    }
}
Was this page helpful?