0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.224.51.49


Current Path : /var/www/website/bkmh/js/
Upload File :
Current File : /var/www/website/bkmh/js/log.js

// let button = document.getElementById("submitHandler");

// button.addEventListener("click", () => {
//   fetch("php/log.php", {
//     method: "POST",
//     headers: {
//       "Content-Type": "application/json",
//     },
//   });
// });

function uploadFile() {
  let files = document.getElementById("fileInput").files;

  const formdata = new FormData();
  formdata.append("files", files[0]);
  $.ajax({
    type: "POST",
    url: "./src/log.php",
    data: formdata,
    processData: false,
    contentType: false,
    success: function (params) {
      let res = JSON.parse(params);
      console.log(res);
    },
  });
}