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

191
Vistas
How Discord checks if a Javascript File is a folder on client side?

I notice that Discord can detect if you drop a folder without sending any validation request to a server, all in the client. How can I do that?

When a file is submitted from an <input type="file"> then there is no problem, because it can't select folders, but on a drag-and-drop system you can drop anything and I'm looking for a way to detect folders because it's weird how if you drop a folder, let's say folderExample you get a File object with the property type="", BUT when you drop the same folder with a name like folderExample.jpg now the type is "image/jpeg"!!!

There is how I'm handling the file dropping, hope some can help

const handleDrop = (e) => {
    e.preventDefault();
    e.stopPropagation();
  
    const {files} = e.dataTransfer;
    console.log('Dropped files:', files)
  };
about 4 years ago · Santiago Gelvez
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