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

218
Views
How to array data load into input in JavaScrript?

I want to load fileArray data as value into name="article_media" input. but i don't understand how to insert this array data into input.

I don't understand how to insert array data into input(multiple files)

<input class="form-control" hidden aria-hidden="true" type="file" name="article_media" 
id="id_article_media" multiple accept>

<script>
    let oldArray = [
        {
            "id": 1,
            "name": "vue-file-agent.umd.js",
        },
        {
            "id": 2,
            "name": "dribbble.webp",
        },
        {
            "id": 3,
            "name": "Screenshot from 2022-06-23 08-25-07.png",
        }
    ]

    const articleMedia = document.querySelector('#id_article_media');
    articleMedia.value = oldArray;
    console.log(articleMedia.value)
</script>
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!