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

128
Visualizações
Problemb in formidable in node js

Here is the my route for getting form data and isvalid function check the type of file and return true/false. enter image description here enter image description here enter image description here when i upload image with type jpg,jpeg,png isvalid function true and file uploded.and when i uplod pdf it give me error as expected but some dummy data is uploded in my upload folder .whenever validation failed it works expectedly but some dummy data stored in upload folder.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It is too late inside the form.parse callback to validate files, at this point they are already uploaded.

Try again with formidable version 3 and then use the filter option

options.filter {function} - default function that always returns true. Use it to filter files before they are uploaded. Must return a boolean.

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