Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!