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

184
Views
lea el archivo con php que envió axios con tipo de contenido: imagen/jpeg

hola, creo un programa simple cuando cambia el tipo de archivo de entrada, carga el archivo en el servidor y lo obtiene por php pero en el servidor php no devuelve ningún dato y $_FILES está vacío

el tipo de contenido de mi formulario es imagen jpeg y no debería cambiar

y se pone el tipo de solicitud

y nunca use formdata

aquí mi código:

 document.getElementById('filexxx').addEventListener('change',function(e){ var formdata = new FormData(); window.temp = e.target.files[0]; console.log(e.target.files[0]); //https://divar.ir/upload_s3/temp/xxx.jpg axios.put('http://localhost:8080/test.php', e.target.files[0], { withToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiMDkzNzUyMTA4NTciLCJleHAiOjE2MzY4Nzk1MDcuMDY3MTI2LCJ2ZXJpZmllZF90aW1lIjoxNjM1NTgzNTA3LjA2NzEzMSwidXNlci10eXBlIjoicGVyc29uYWwiLCJ1c2VyLXR5cGUtZmEiOiJcdTA2N2VcdTA2NDZcdTA2NDQgXHUwNjM0XHUwNjJlXHUwNjM1XHUwNmNjIn0.P0sfbX9pg_jOpX2zhf2H5YmIrBdXo-7NSq2ayaJIoQo', headers: { "Content-Type": "image/jpeg" }, timeout: null }) });

y mi código del lado del servidor en test.php

 <?php var_dump($_REQUEST); var_dump($_FILES);
about 4 years ago · Juan Pablo Isaza
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!