File post problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

File post problems

Trampas Stern
I am having a problem posting files to lwip server.  I know the code was working and then seems to have randomly stopped working.  I was wondering if anyone could help me with my problem? 

Thanks
Trampas

Here is the HTML I am using to post a file:

<div class="row p-3">
<div class="col">
 <p>Current Firmware Version: 1.001.2</p>
<form action="upload" method="post" enctype="multipart/form-data">
 <div class="form-group">
<label for="exampleFormControlFile1">Example file input</label>
<input type="file" class="form-control-file" id="exampleFormControlFile1">
<br>
<button type="submit" class="btn btn-primary">Apply Update</button>
 </div>
</form>
</div>
</div>

It appears I receive the following on  lwip server but not the file:
POST /upload HTTP/1.1
Host: 192.168.72.100
Connection: keep-alive
Content-Length: 44
Cache-Control: max-age=0
Origin: http://192.168.72.100
Upgrade-Insecure-Requests: 1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryqsRCORAbzV0VtDn5
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://192.168.72.100/update.htm
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

------WebKitFormBoundaryqsRCORAbzV0VtDn5--

Wireshark:

image.png



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: File post problems

Trampas Stern
I replaced HTML with this and the post started working again.  I am not sure what I did wrong in HTML...

<!doctype html>
<html lang="en">

<body>
    <form action="fileupload" method="post" enctype="multipart/form-data">
        <input type="file" name="filetoupload"><br>
        <input type="submit">
    </form>
</body>
</html>


On Tue, Jan 14, 2020 at 3:00 PM Trampas Stern <[hidden email]> wrote:
I am having a problem posting files to lwip server.  I know the code was working and then seems to have randomly stopped working.  I was wondering if anyone could help me with my problem? 

Thanks
Trampas

Here is the HTML I am using to post a file:

<div class="row p-3">
<div class="col">
 <p>Current Firmware Version: 1.001.2</p>
<form action="upload" method="post" enctype="multipart/form-data">
 <div class="form-group">
<label for="exampleFormControlFile1">Example file input</label>
<input type="file" class="form-control-file" id="exampleFormControlFile1">
<br>
<button type="submit" class="btn btn-primary">Apply Update</button>
 </div>
</form>
</div>
</div>

It appears I receive the following on  lwip server but not the file:
POST /upload HTTP/1.1
Host: 192.168.72.100
Connection: keep-alive
Content-Length: 44
Cache-Control: max-age=0
Origin: http://192.168.72.100
Upgrade-Insecure-Requests: 1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryqsRCORAbzV0VtDn5
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://192.168.72.100/update.htm
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

------WebKitFormBoundaryqsRCORAbzV0VtDn5--

Wireshark:

image.png



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users