HTTP multipart/form-data with ESP32

Viewed 18

I am trying to implement OTA with ESP32 and thinking of using HTTP multipart/form-data as a protocol. Since I don't have a broad background in this protocol type, I wonder how I can receive HTTP multipart/form-data(file) from the server (to ESP32).

Could you give me any code examples, useful libraries, or general flow of it?

Also, I am currently using HTTPClient.h to post data to the server. Is this library enough to implement HTTP multipart form, or do I need the other one?

FYI, my OTA scenario is as below:

  1. (ESP32->server) check if there are any required updates
  2. (server->ESP32) send whether there exists any update
  3. (ESP32->server) request updates
  4. (server->ESP32) send firmware update file(s)
  5. (ESP32) receive the file(s) and reboot the device

Thank you in advance!

1 Answers

I think what you need is to use the Mongoose OS implementation for your ESP32. Its pretty straightforward, and all your remote OTA update requirement will be satisfied.

Thank You, Hope it helps

Related