Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

261
Vistas
Trying to use file from <input type=file>

Im trying to make an employee card who gets a file from a <input type="file"/> push this file to an array and display it as a "profile picture".

html:

<label for="formFileLg" class="form-label"></label>
<input class="form-control form-control-lg" id="Img" type="file">

Js- push the file in the array:

function addEmployee() {
    employees.push({
        name: Name.value,
        age: Age.value,
        **img: Img.value**
    })
}

Js- display the file:

<img 
    src="${employees[i].img}" 
    class="bd-placeholder-img card-img-top" 
    width="100%" 
    height="225" 
    xmlns="http://www.w3.org/2000/svg" 
    role="img" 
    aria-label="Placeholder: Thumbnail" 
    preserveAspectRatio="xMidYMid slice" 
    focusable="false"
/>

what do I need to add\change?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda