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

144
Vistas
How to get files submitted from a form into a local folder using javascript

I want to grab files put into the form into a folder in the same directory all i have is the form and a the javascript for the file to be able to get selected

            <form>
              <div id="filejs" class="file is-info has-name">
                <label class="file-label">
                  <input class="file-input" type="file" name="stuff" />
                  <span class="file-cta">
                    <span class="file-icon">
                      <i class="fas fa-upload"></i>
                    </span>
                    <span class="file-label"> </span>
                  </span>
                  <span class="file-name"> Upload file </span>
                  <input class="button" type="submit" value="Submit input" />
                </label>
              </div>
            </form>
         
    <script>
      const fileInput = document.querySelector("#filejs input[type=file]");
      fileInput.onchange = () => {
        if (fileInput.files.length > 0) {
          const fileName = document.querySelector("#filejs .file-name");
          fileName.textContent = fileInput.files[0].name;
        }
      };
    </script>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can not get uploaded files from a form with client-side Javascript. You will require any backend technology for this job. You can use node.js as it is an asynchronous event-driven JavaScript runtime environment. There are many free packages available that can handle form files and form data like multer, formidable, form-data etc.

Also, you can check out the PHP form handling method here.

about 4 years ago · Juan Pablo Isaza 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