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

110
Views
List of .png files in html and js

I am trying to create a something in my project, that display the images that ends with .png

Currently, I have this part of code :

  <h2>Files list :</h2>
  <p id="list"></p>
  <script>
    import 'path';

    const EXTENSION = '.png';

    const targetFiles = files.filter(file => {
      return path.extname(file).toLowerCase() === EXTENSION;
    });

   if(targetFiles == "") {
    document.getElementById("list").innerHTML = "No images found.";
   } else {
    document.getElementById("list").innerHTML = targetFiles;
   }
</script>

The issue here is that I can't find an alternative solution for the path package that is working for web and can help me with this.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You cannot access any file system through a web application, client or server, no matter how "localy on a pc" it will be.

To do the kind of thing you're describing, you need a second application to handle the file system lookup and/or transfer (presumably, you also want to see the images, right?). And then the two applications can talk over AJAX calls or web-sockets to request the look ups and download the needed files.

about 4 years ago · Santiago Trujillo Report

0

  1. step 1 for HTML

    img src= for pic

  2. step 2

    use the internet to look for picture or go to gallery to find a picture go to your file

  3. step3

    use the img src for the picture example img src =a

about 4 years ago · Santiago Trujillo 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!