send file to server with esp32

mehrdadco
Posts: 8
Joined: Tue Jun 11, 2019 8:53 am

send file to server with esp32

Postby mehrdadco » Sat Jul 27, 2019 12:04 pm

hi
I'm working on a project that reads online data from sensors and sends them to a webserver(with post.req)
also, the data are saving in an sd card at the same time.

now I want to send the file that created in sd card to the webserver

is it possible

it would be great if someone can help me with the same example or any information

Thanks

mehrdadco
Posts: 8
Joined: Tue Jun 11, 2019 8:53 am

Re: send file to server with esp32

Postby mehrdadco » Sat Aug 03, 2019 8:57 am

is it possible to convert a file to json?

I am trying to send a CSV file to my website

i can read a file at first and send the data on a file to my website but its not clean!

ESP_Sprite
Posts: 9580
Joined: Thu Nov 26, 2015 4:08 am

Re: send file to server with esp32

Postby ESP_Sprite » Mon Aug 05, 2019 3:37 am

I don't get your question? Your data is already saved as a csv to the filesystem, right? What's stopping you from stashing the contents of that csv in a post request and sending it over? What would be not 'clean' about that?

mehrdadco
Posts: 8
Joined: Tue Jun 11, 2019 8:53 am

Re: send file to server with esp32

Postby mehrdadco » Sat Aug 24, 2019 1:09 pm

I don't know why I didn't receive any emails that you answered
sorry for delay
now because that i solved some of my issues i should change the question
1-the program send online data(ONE LINE DATA)
2-the data are saved at the same time in a csv file
3-issue- after 13kb file lengths (200LINE DATA) it can not be sent and i get this -3 that come from
HTTPC_ERROR_SEND_PAYLOAD_FAILED (-3)

my idea
1 - we may can seperate the content of the file in sd and then send it with post.req
2- looking for another way of sending

ESP_Sprite
Posts: 9580
Joined: Thu Nov 26, 2015 4:08 am

Re: send file to server with esp32

Postby ESP_Sprite » Mon Aug 26, 2019 2:17 am

Ah, gotcha, this is with the Arduino http client, right? If any, you could try to see if the native ESP-IDF http client has the same limitations; it may very well not have that. Alternatively, you could indeed cut up your data and e.g. post every n lines.

mehrdadco
Posts: 8
Joined: Tue Jun 11, 2019 8:53 am

Re: send file to server with esp32

Postby mehrdadco » Tue Aug 27, 2019 1:38 pm

is it possible to send a N line of a file and then another N line of the same file?
for me i think its difficult to save a specific line in a file and then read after that

Who is online

Users browsing this forum: tharanilc and 257 guests