Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
No se pueden cargar archivos al servidor web desde el sitio web con js/php

Estoy alojando mi sitio web en mi raspberry pi. Estoy tratando de crear un sitio web, que ofrece la opción de cargar imágenes en mi servidor web. La estructura va como. www.URL.de/projects/nameOfTheProjects/uploads .

Cuando ejecuto el sitio web con XAMPP, funciona, pero desde mi servidor web no.

¿Algunas ideas?

 <?php //Move files to directory $targetPath = "uploads/" . basename($_FILES["inpFile"]["name"]); move_uploaded_file($_FILES["inpFile"]["tmp_name"], $targetPath); ?>

 <form id="myForm"> <input type="file" id="inpFile"><br><br> <button type="submit">UPLOAD</button> </form> </center> <script> const myForm = document.getElementById("myForm"); const inpFile = document.getElementById("inpFile"); myForm.addEventListener("submit", e =>{ e.preventDefault(); const endpoint = "upload.php"; const formData = new FormData(); // console.log(inpFile.files); formData.append("inpFile", inpFile.files[0]); //endpoin fetch(endpoint, { method: "post", body: formData, console: console.log("DONE") }).catch(console.error); }); </script>
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!