"filename" lost when trying to Post a file to http server ,via EC20

I sent AT commands according to 《Quectel_EC2x&EG9x&EM05_HTTP(S)_AT_Commands_Manual_V1.0》
the AT commands log :

recv:RDY

send:AT+QHTTPCFG=“contextid”,1
recv:OK

send:AT+QHTTPCFG=“contenttype”,3
recv:OK

send:AT+QIACT=1
recv:OK

send:AT+QHTTPURL=41,80
recv:CONNECT

send:http://222.128.104.202:15167/posttest.php
recv:OK

send:AT+QHTTPPOSTFILE=“UFS:test2.txt”,80
recv:OK

====================

but , the post-request which the server receives is :

POST /posttest.php HTTP/1.1
Host: 222.128.104.202:15167
Accept: /
User-Agent: QUECTEL_MODULE
Connection: Keep-Alive
Content-Type: multipart/form-data;boundary=7dquecteldfffffffkfsjgfjkfdkjl7d33a816d302b6
Content-Length: 210
–7dquecteldfffffffkfsjgfjkfdkjl7d33a816d302b6
Content-Disposition: form-data; name=“file”; filename=""
Content-Type: application/octet-stream

TTTTTTTTTT
–7dquecteldfffffffkfsjgfjkfdkjl7d33a816d302b6–

====================================
as you can see ,the filename="" ,lost the name of file “test2.txt”.
however the Content "TTTTTTTTTT"in the file is received . just lost filename.

1 Like

Dear Ivpengily,
Please try the following method with customize HTTP(S) request header, define the header by yourself to add the file name. The module can not post the file name automatically. Thanks!

1 Like

according to the< AT_Commands_Manual >,if the request_header is set to 1( customized mode ),the post header and post body should be both in the file content . then EC20 sends the file content in one tcp pack ,which contains the post header and post body.
But the correct Process should contain two tcp packs:
first step: ec20 posts the head , server reply 100-continue.
second step: ec20 posts the body , server replay http

so what is the method to let ec20 send two tcp packs (one for header ,the other for body)rather than one pack?

1 Like

Dear Lv,
I have already answer your email, please check it. And you also can contact our local FAE to get technical support on site. Thanks!

1 Like

Hai sir i am developing quectel ec20 hhtp post method i am not 200 success getting 400 respond please support me
[2021-01-18_16:37:46:987]AT+QHTTPCFG=“contextid”,1

[2021-01-18_16:37:46:987]OK
[2021-01-18_16:37:48:043]AT+QHTTPCFG=“requestheader”,1

[2021-01-18_16:37:48:043]OK
[2021-01-18_16:37:48:635]AT+QHTTPCFG=“requestheader”,1

[2021-01-18_16:37:48:635]OK
[2021-01-18_16:37:49:179]AT+QHTTPCFG=“sslctxid”,1

[2021-01-18_16:37:49:179]OK
[2021-01-18_16:37:49:691]AT+QHTTPCFG=“contenttype”,1

[2021-01-18_16:37:49:691]OK
[2021-01-18_16:37:50:699]AT+QIACT=1

[2021-01-18_16:37:50:699]ERROR
[2021-01-18_16:37:53:931]AT+QIDEACT=1

[2021-01-18_16:37:53:946]OK
[2021-01-18_16:37:55:274]AT+QIACT=1

[2021-01-18_16:37:55:289]OK
[2021-01-18_16:37:57:801]AT+QICSGP=1,1,“airtelgprs.com”,"" ,"" ,1

[2021-01-18_16:37:57:801]OK
[2021-01-18_16:37:59:467]AT+QHTTPURL=54,60

[2021-01-18_16:37:59:483]CONNECT
[2021-01-18_16:38:01:989]
[2021-01-18_16:38:01:989]OK
[2021-01-18_16:38:06:341]AT+QHTTPPOST=224,30

[2021-01-18_16:38:06:551]CONNECT
[2021-01-18_16:38:12:589]
[2021-01-18_16:38:12:589]OK
[2021-01-18_16:38:12:693]
[2021-01-18_16:38:12:693]+QHTTPPOST: 0,400,326
[2021-01-18_16:38:13:788]

1 Like

Dear Raju_G,
Thanks for your inquiry in Quectel forum.
For your issue, please check whether the URL you input is correct, and whether can open it with browser normally. Please try to check whether the module already get register on network with AT+QIACT?, and also please confirm whether the URL you used need the SSL certificate.Thanks!

1 Like

Dear Sir,

When we write both custom header and body in one file. How the server differentiate between the two.

1 Like