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

355
Visualizações
xmlhttprequest check file exists not found file when build FLASK web app with Pyinstaller

I am building web app with Flask and Pyinstaller to build a single executable and i have the following problem:

  • Run by simply running "Python app.py" everything works fine. But after building the .exe file with Pyinstaller, the javascript code in the html file that has the function to check whether the created file exists or not, can't route to that file path even though the file exists, I tried manually enter the path to the file in the URL bar but the path cannot be found error,
  • Does building the python executable with Pyinstaller not route the newly created file? And is there any solution to fix it?
    var http = new XMLHttpRequest();
    http.open('HEAD', "/static/" + name_file_rc + ".avi", false);
    http.send();
    if (http.status === 200){
       allow_download = true;
       $('#remove_download').show();
       $('#download').show();                                                      
       $('#frame_record,#second,#size_file,#title_size_file,#title_second').show();
       Flag_stop_record_by_err = false;
       clearInterval(allow_download_inter);
       clearTimeout(timeout_download);
    }
    else{
       allow_download = false;
       // console.log("Load file fail");
    }
    
  • Thank you all for viewing my problem and looking forward to your help.
about 4 years ago · Juan Pablo Isaza
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