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

120
Views
Downloading 100+ Images to Local Drive JavaScript and Node

Our engineering design firm has engineering photos that engineers use for designing. Each folder can contain 100+ engineering photos. We would like to know how to implement the best logic for the engineer to download all images (given that there are 100+ photos in the folder) as a zip requesting it from the frontend and sending the folder name to the server to fetch the pictures that belong to that folder name and download them to their local drive i.e desktop or documents folder.

***MY FRONTEND CODE***
const saveImgsBtn = document.getElementById('saveImgsBtn')


saveImgsBtn.addEventListener('click', async()=>{

  const folder = {
    name: 'IDxyz123_images'
  }
  const response = await fetch('http://localhost:5000/engineer/design/getImages',{
    method:'POST',
    body:JSON.stringify(folder),
    headers:{
      'Content-Type':'application/json'
    }
  })

  let result = await response.json()
  
})


***MY BACKEND CODE(NODE JS)***
  let mainFolderPath = './design_images'
    let childFolder = req.body.name

    let folderURL = `${mainFolderPath}/${childFolder}`

    let folderExists = fs.existsSync(folderURL)

    if(folderExists){
      res.status(200).json({
        message:'Folder exists. Would you like to download images?'
      })
      //Logic to download images to local drive
    }else{
      res.status(404).json({
        message:'Folder does not exist. Please verify if folder name is correct.'
      })
    }


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!