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

251
Vistas
can I make file input and add value in HTML?

can I make file input and add value in HTML like below? Because it seems not working.

  const videoInput = document.createElement("input");
  videoInput.type = "file";
  videoInput.value = videoFile;
  RecordForm.appendChild(videoInput);

from this i guess it should make this *** line added. But it doesn't work.

pug file

    form#RecordForm(method="POST")
        input#DateInput(type="date" name="date")
        label(for="title") Title:
        input#TitleInput(type="text" name="title")
        input(type="file" value=videoFile) ***
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Instead of

videoInput.value = videoFile;

Change it to

videoInput.files.file[0] = videoFile;

Since it an input type file

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