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

185
Views
Cómo mostrar la imagen después de enviarla (HTML y JS)

estos son mis códigos HTML y JavaScript

CÓDIGO HTML

 <h1>Input element</h1> <form action=" "> <input type="file" name="picture" accept="image/*" onChange="loadfile(event)"> <label for="file">UpLoad</label> <input type="submit"> </form> <img id="pics" width="200px" height="200px" style="display: none;">

Código JavaScript

 <script> var loadfile = function(event){ var image = document.getElementById('pics'); image.style.display = "block"; image.src = URL.createObjectURL(event.target.files[0]); }; </script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe recibir una imagen en el servidor con el mismo código que se muestra a continuación en php:

 <?php function get_uploadFile() { $upload_path = 'upload-path/'; $upload_filename = $upload_path . basename($_FILES['uploadFile']['name']); if (move_uploaded_file($_FILES['uploadFile']['tmp_name'], $upload_filename)) { return $upload_filename; } else { return false; } } if ($src = get_uploadFile()) { echo '<img src="' . $src . '">'; } else { echo 'Error uploading file!'; }
about 4 years ago · Juan Pablo Isaza Report
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!