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

179
Visualizações
Form submission stops when my data comes from a text file

I am developing an application on a custom STM32f7 that hosts a web server. My task is to update the application from this web server: by selecting a .bin file and clicking on a simple button. The objective is to write this file in the memory and then to trigger the bootloader which will move the vector table and perform the necessary init. Everything is functional except the part of writing the file in the memory. I develop this part in javascript and I want to send a succession of POST requests since on the c processing side, I can't receive very large data. My file has more than 20000 lines of this type: 1111 2222 3333 4444 5555 6666 7777 8888\n 1111 2222 3333 4444 5555 6666 7777 8888\n ...

When my data are example values that I enter manually between "..." I can send as many POST requests as I want (see in the for loop the line in comment). But in my case I want to send 30 lines by 30 lines of data. I manage to send this data but after a random time (it may be after 20 or 200 requests sent), the requests are not sent and my web server freezes. My code is not very clear, I post you the function on which I meet my problem. To submit my form successively with a data "hidden" I use setInterval().

    function cut(){
        document.getElementById('mydata_file').value = "";
        pas = pas + 30;
        for (let k = pas; k < pas+30; k++) {
            tab[k] = fich.slice(0+k*41, 41+k*41);
            document.getElementById('mydata_file').value += tab[k];
            //document.getElementById('mydata_file').value += "AAAA ";
        }
    }

    function send_form(){
        document.getElementById("myForm").submit();
    }

The program is almost functional, do you have any suggestions for me ?

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