This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/DK-TM4C129X: How can I upload large file (about 1M) to the TM4C129X embedded web server

Part Number: DK-TM4C129X

Tool/software: TI-RTOS

Hello, 
I am working on a project that requires me to upload files from the PC (wav(1M size), doc, excel) to an embedded web server running on a TM4C129X chip. I'm using TI RTOS, NDK, BSD sockets. I have beginner html and javascript skills. Could you please point me to the right direction because I am clueless on what to do next. This is what I have done based what I have researched so far. Below is a simple HTML code that allows me to upload a simple text file. It looks like I could do it with a text file. Please see the output below the HTML. But when I try uploading a doc or a wav file, I don't see the contents being transferred. From what I have gathered, it might be a buffer, memory issue on the server side. I tried changing TCP parameters of the TI RTOS config file like the TCP receive buffer size, reassembly packets, buffer size limit.. and no matter what I did I still got the same result --> I played around with the size of the text file and this is what happens  -> If the file size is <= 1166 bytes, I am able to get the contents of text file. If it goes higher than that, then transfer fails.  I am still a beginner when it comes to web servers so there might be other ways to do this right.. Any suggestion is greatly appreciated.
Thanks
AJ 
Below is the html code and the output from the serial port.
 <!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>File Transfer</title>
    <!------------------------>
    <style>
      body {
        width: 305px;
        margin: 0 auto;
        background-color: #ccc;
      }
    </style>
    <!------------------------>
  </head>
  <body>
    <h1>File Transfer</h1>
    <p><img src="pic.jpg" alt="First-In"></p>
    <form method='POST' enctype='multipart/form-data' action='fup.cgi'>
      <p>Upload file</p>
      <input type="file" name="File" value="File">
      <p></p>
      <input type="submit" name="Upload" value="Upload">
    </form>
  </body>
</html>
This is the output when my text file is <= 1166 bytes
Message = POST /fup.cgi HTTP/1.1
Referer: 10.20.30.120/File_Transfer.html
Cache-Control: max-age=0
Content-Type: multipart/form-data; boundary=---------------------------7e259540702
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
Accept-Language: en-US
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Upgrade-Insecure-Requests: 1
Accept-Encoding: gzip, deflate
Host: 10.20.30.120
Content-Length: 286
Connection: Keep-Alive

-----------------------------7e259540702
Content-Disposition: form-data; name="File"; filename="Test.txt"
Content-Type: text/plain

Hello
-----------------------------7e259540702
Content-Disposition: form-data; name="Upload"

Upload
-----------------------------7e259540702--


Number of bytes received = 866
And this is the output if the file is huge
Message = POST /fup.cgi HTTP/1.1
Referer: 10.20.30.120/File_Transfer.html
Cache-Control: max-age=0
Content-Type: multipart/form-data; boundary=---------------------------7e230c2040702
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
Accept-Language: en-US
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Upgrade-Insecure-Requests: 1
Accept-Encoding: gzip, deflate
Host: 10.20.30.120
Content-Length: 12183
Connection: Keep-Alive


Number of bytes received = 584