Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

111
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda