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

260
Views
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
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!