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

115
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
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